1 Answer
- Newest
- Most votes
- Most comments
1
Athena does not have a provision to enforce a WHERE clause on partition columns in a query unfortunately. However, Athena workgroups do allow you to set data usage controls using which you can restrict the data scanned by queries.
There are two types of data usage controls that can be utilized:
- The per-query limit: Allows you to specify the total amount of data scanned per query. Any query in the workgroup that exceeds this data limit gets canceled.
- The workgroup-wide data usage alert: Allows you to specify thresholds on aggregate data scanned by all queries running in the workgroup within a specified time period (For example, hourly or daily aggregates). Please note that, with this limit, queries are not automatically canceled when a threshold is reached. But instead, it can be used to set alerts and push notifications to SNS topics depending on which you can take further actions (For example, invoking a Lambda function that disables the workgroup).
Please refer to the following document for more information regarding these data usage controls: https://docs.aws.amazon.com/athena/latest/ug/workgroups-setting-control-limits-cloudwatch.html
Relevant content
- asked 2 years ago
- asked 7 years ago
- asked a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 9 months ago