Amazon Athena automatically stores query results and metadata information for each query that runs in a query result location that you can specify in Amazon S3.
If necessary, you can access the files in this location to work with them. You can also download query result files directly from the Athena console.
To determine the location that Athena will use you need a combination of a workgroup and client-side settings.
The client-side settings are based on how you run the query:
If you run the query using the Athena console, the Query result location entered under Settings in the navigation bar determines the client-side setting.
If you run the query using the Athena API, the
OutputLocationparameter of the StartQueryExecution action determines the client-side setting.
If you use the ODBC or JDBC drivers to run queries, the
S3OutputLocationproperty specified in the connection URL determines the client-side setting.
To use the AWS CLI to identify the query output location and result files, run the
aws athena get-query-execution command, as in the following example.
aws athena get-query-execution --query-execution-id <your-query-id>
Note: When you run a query using the API or using the ODBC or JDBC driver, the console setting does not apply.
For more detailed information, refer to Finding Query Output Files in S3.
I hope this helps.
Aws athena- query both s3 and rdsasked 3 years ago
Save / backup Athena viewAccepted Answerasked 2 years ago
Using S3 bucket as source for table in Athenaasked 23 days ago
Athena Query Error on LIBSVM file in S3asked 3 months ago
Athena Table using S3asked 21 days ago
Additional Costs for running query in Athena on S3Accepted Answerasked 3 years ago
When querying athena using aws sdk, is it necessary to save results in s3?Accepted Answerasked 3 months ago
S3 Select vs AthenaAccepted Answerasked 2 years ago
How to store the Athena Query Results in DynamoDB table?asked 3 years ago
I cannot use current_date + interval in Athena boto3 query in LambdaAccepted Answerasked 7 months ago