如何通过ATHENA CLI命令- aws athena start-query-execution编写多条CREATE TABLE语句来执行多条SQL语句
我已经尝试过了,但只用了一条SQL语句,它工作得很好。但是我需要运行多个SQL语句
通过CLI雅典娜命令执行( select count(*) from elb_logs; create external table tbl_nm; )。
aws athena start-query-execution \
--query-string "select count(*) from elb_logs;" \
--query-execution-context Database=default \
--result-configuration OutputLocation=s3://aws-athena-query-results-xxxxxxxxxx-us-east-1/ \
--region us-east-1 \
--output text应该能够通过CLI命令在AWS Athena上执行多个SQL语句。
发布于 2019-07-02 15:56:57
我认为你不能在一个CLI命令中运行多个查询,我只是尝试了一下,得到了这个错误:
An error occurred (InvalidRequestException) when calling the StartQueryExecution operation:
Only one sql statement is allowed.一个接一个地跑。
https://stackoverflow.com/questions/56846823
复制相似问题