DAS-C01 · Question #144
A reseller that has thousands of AWS accounts receives AWS Cost and Usage Reports in an Amazon S3 bucket. The reports are delivered to the S3 bucket in the following format…
The correct answer is D. Partition the data by account ID, year, and month. Athena's performance improves through partition pruning - the ability to skip scanning partitions irrelevant to a query. Business analysts generate monthly summary reports per AWS account, so queries are filtered by account and month. Partitioning by account ID, year, and month…
Question
A reseller that has thousands of AWS accounts receives AWS Cost and Usage Reports in an Amazon S3 bucket. The reports are delivered to the S3 bucket in the following format:
<examp/e-reporT-prefix>/<examp/e-report-rtame>/yyyymmdd-yyyymmdd/<examp/e-report- name> parquet An AWS Glue crawler crawls the S3 bucket and populates an AWS Glue Data Catalog with a table Business analysts use Amazon Athena to query the table and create monthly summary reports for the AWS accounts. The business analysts are experiencing slow queries because of the accumulation of reports from the last 5 years. The business analysts want the operations team to make changes to improve query performance. Which action should the operations team take to meet these requirements?
Options
- AChange the file format to csv.zip.
- BPartition the data by date and account ID
- CPartition the data by month and account ID
- DPartition the data by account ID, year, and month
How the community answered
(70 responses)- A13% (9)
- B7% (5)
- C4% (3)
- D76% (53)
Explanation
Athena's performance improves through partition pruning - the ability to skip scanning partitions irrelevant to a query. Business analysts generate monthly summary reports per AWS account, so queries are filtered by account and month. Partitioning by account ID, year, and month creates a three-level partition hierarchy that exactly matches this query pattern: Athena can immediately skip all partitions that don't match the requested account, year, and month. Option C (month and account ID only) omits year, which would cause Athena to scan all years for a given month/account combination. Option B (date and account ID) is too granular and creates excessive partitions. Option A (CSV format) is a regression from Parquet and would worsen performance.
Topics
Community Discussion
No community discussion yet for this question.