How to write multiple CREATE TABLE
statement to execute multiple SQL statements via ATHENA CLI
command - aws athena start-query-execution
I have tried this but just with single SQL statement and it works fine. But I need to run multiple SQL statements
( select count(*) from elb_logs; create external table tbl_nm; )
via CLI Athena command.
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
Should be able to execute multiple SQL statements on AWS Athena via CLI command.