Bitzu

SAA-C03 ยท Data ingestion, lakes and analytics

Amazon Athena and Amazon Quick Sight

Serverless SQL on S3 with Athena, partitioning to cut scanned data, and building dashboards with the AWS business intelligence service.

Key points

  • Athena: serverless SQL on S3 files, tables from the Glue Data Catalog.
  • On-demand billing by data scanned: partitions (filter in WHERE), columnar formats, compression cut time and cost.
  • New partitions: MSCK REPAIR TABLE (Hive-style), ALTER TABLE ADD PARTITION (other layouts), or partition projection.
  • Dashboards: Amazon Quick Sight (formerly QuickSight) connects to Athena, imports data into the SPICE in-memory engine.

Source: https://docs.aws.amazon.com/athena/latest/ug/partitions.html

Practice questions

Single choice

What drives the charge for an on-demand Amazon Athena SQL query?

  1. The number of rows the query returns
  2. The hours a query cluster stays running
  3. The amount of data the query scans
  4. The number of tables in the Data Catalog
Show answer

Answer: C. The amount of data the query scans

Athena on-demand queries are billed per amount of data scanned, with a 10 MB minimum per query. There are no instances or query hours to pay for, which is why scanning less data directly lowers the bill.

Select all that apply

Which changes reduce the amount of data Athena scans, and so the cost of queries?

  1. Filter on the partition column in the WHERE clause
  2. Send the query from a larger EC2 instance
  3. Store the data as Parquet and select only needed columns
  4. Compress the data files, for example with gzip
  5. Spread the same queries across several workgroups
Show answer

Answer: A. Filter on the partition column in the WHERE clause, C. Store the data as Parquet and select only needed columns, D. Compress the data files, for example with gzip

Filtering on a partition column makes Athena read only that partition; columnar Parquet lets it read only the selected columns; compression shrinks the bytes read. Athena is serverless, so the client machine size does not matter, and spreading queries across workgroups changes cost tracking, not bytes scanned.

True or false

Athena does not charge for queries that fail, so a failing query over a large table costs nothing.

Show answer

Answer: False

False. Athena bills data scanned for both successful and unsuccessful queries, so a query that fails after scanning a lot of data still costs money.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More SAA-C03 topics in this module