Getting this error when try to start an Athena query using Python:
"Error details
TABLE_NOT_FOUND: line 5:11: Table 'awsdatacatalog.athenacurcfn_c_u_r_athena.cur_athena' does not exist
This query ran against the "athenacurcfn_c_u_r_athena" database, unless qualified by the query. "

However, if I click on "Run Again" in the exact same way, it works fine.

Python code is pretty standard, not sure why it´s failing. Any ideas? Thanks a lot
query_execution_context = {
"Database": athena_database,
"Catalog": "AwsDataCatalog",
}
# Execute Athena query
response = athena_client.start_query_execution(
QueryString=query,
QueryExecutionContext=query_execution_context,
ResultConfiguration={
'OutputLocation': f's3://{s3_bucket}/{s3_prefix}/',
'EncryptionConfiguration': {
'EncryptionOption': 'SSE_S3'
},
},
)
I'm running into the same issue while connecting a python query to connect to Athena database. I'm getting the below error "TABLE_NOT_FOUND: line 1:15: Table 'Catalogue name.database_name.table_name' does not exist"
This query ran against the "database_name" database, unless qualified by the query. Snippet from the python script:
import boto3 import time
Note - Glue IAM permission is also given