MCPcopy Create free account
hub / github.com/apache/impala / do_source

Method do_source

shell/impala_shell/impala_shell.py:1761–1770  ·  view source on GitHub ↗
(self, args)

Source from the content-addressed store, hash-verified

1759 return self.do_source(args)
1760
1761 def do_source(self, args):
1762 try:
1763 cmd_file = open(args, "r")
1764 except Exception as e:
1765 print("Error opening file '%s': %s" % (args, e), file=sys.stderr)
1766 return CmdStatus.ERROR
1767 if self.execute_query_list(parse_query_text(cmd_file.read())):
1768 return CmdStatus.SUCCESS
1769 else:
1770 return CmdStatus.ERROR
1771
1772 def postloop(self):
1773 """Save session commands in history."""

Callers 1

do_srcMethod · 0.95

Calls 3

execute_query_listMethod · 0.95
parse_query_textFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected