Use subprocess.check_call when running queries
This commit is contained in:
Родитель
9288443caf
Коммит
4f2a52289f
|
@ -87,8 +87,7 @@ def main():
|
|||
|
||||
with open(query_file) as query_stream:
|
||||
# run the query as shell command so that passed parameters can be used as is
|
||||
sql = query_stream.read()
|
||||
subprocess.call(["bq"] + query_arguments + [sql])
|
||||
subprocess.check_call(["bq"] + query_arguments, stdin=query_stream)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Загрузка…
Ссылка в новой задаче