Retrieving Athena Query History data

0

Is there any way to get the athena query history data from S3 rather than going through the hassle of getting query execution id's using ListQueryExecutions and calling GetQueryExecution API to get the details like data scanned, execution time etc. ? Can someone please help on this?

aksh203
질문됨 5년 전2686회 조회
1개 답변
0

Hi

Thank you for posting your concerns on AWS Forums.

I understand you would like to get Athena query history data like data scanned and execution time for Athena queries without using get-query-execution.

I am afraid that statistics like DataScannedInBytes and EngineExecutionTimeInMillis are not stored in S3, only the result of a Query is stored in CSV format. Therefore, it would be required for you to use the get-query-execution API to get there statistics.

Alternatively, if you do not require per Query statistic and get the over statistics by all Athena queries, and use Cloudwatch metrics for a work group to track the usage.
Athena publishes the following metrics to the CloudWatch console:
Query Status (successful, failed, or canceled)
Query Execution Time (in seconds)
Query Type (DDL or DML)
Data Processed Per Query. This is the total amount of data scanned per query (in Megabytes).
Workgroup Name

If feasible, you can leverage the above metrics for your use-case.

Please refer https://docs.aws.amazon.com/athena/latest/ug/query-metrics-viewing.html for more details.

I hope this helps. Please reply on this thread in case you have any further concerns.

Have a nice day!

Regards,
Almas S.

AWS
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인