unable to run athena query

0

Execute the query

response = athena.start_query_execution(QueryExecutionContext={ 'Database': 'trainingdb',}, QueryString='select * from "tainingdb.myiotdata"', ResultConfiguration={ 'OutputLocation': 's3://myiotdata01/', 'ExpectedBucketOwner':'562636776084' } )

getting the following error while executing above code from my local jupyter

SYNTAX_ERROR: line 1:15: Table awsdatacatalog.trainingdb.tainingdb.myiotdata does not exist This query ran against the "trainingdb" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 4af7ac1b-34da-43d5-8aff-7ef2408e3ff7

asked a year ago582 views
1 Answer
0

It doesn't like that you put the database in front of the table name in the query. Did you try it without that? Here's some documentation that doesn't have the database name in the query. Since it lists the database name twice in the error message and it's listed once in the query, I assume that's the cause.

https://docs.aws.amazon.com/cli/latest/reference/athena/start-query-execution.html

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions