Course menuDEA-C01

Exams / DEA-C01 / Querying with Athena / Question 2

DEA-C01 practice question: Querying with Athena (2 of 3)

Data Operations and Support A free question from our original DEA-C01 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A logistics broker's dashboard is based on an Athena view that joins shipments, carriers and invoices across three large tables. Forty analysts open the dashboard many times a day, and each open runs the whole join again, which makes the monthly cost of the dashboard very high.

The dashboard can use data that is refreshed once a night, and the team wants the change to be a single, easily maintained step.

Which change meets these requirements?

Choose one answer.

  1. A. Keep the view, and turn on query result reuse for the workgroup, so that identical dashboard queries reuse cached results.
  2. B. Replace the view with a CTAS query that materializes the joined result into a table, refreshed nightly, and point the dashboard at it.
  3. C. Connect the dashboard to the three source tables directly, and add more Athena workgroups so that the joins run in parallel.
  4. D. Export the join result to a CSV file in S3 by hand each month, and point the dashboard at the file.
Show the answer and explanation

Answer: B

  • A. Wrong: Result reuse helps only identical queries that run within the reuse window, and dashboards with different filters or refresh times see little benefit. The view still recomputes the join for most loads. Learn more: Reuse query results in Athena (opens in a new tab)
  • B. Right: Correct. The join runs once each night and writes its result to a table, so the dashboard scans the smaller materialized table. Analysts see nightly data, which matches the requirement, and the change is one scheduled statement. Learn more: Create a table from query results (CTAS) (opens in a new tab)
  • C. Wrong: Direct queries repeat the same join for every open, and more workgroups do not reduce the data scanned. The option keeps the cost problem the team wants to solve.
  • D. Wrong: A monthly export is too stale for a nightly refresh, and it depends on a manual step. The option does not match the requirement.

Explanation

Repeated joins are cheaper when the result is materialized once and read many times. A nightly CTAS writes the joined result to a table, so the dashboard reads a smaller table instead of joining the source tables on every open. Result reuse, direct queries and manual exports do not remove the repeated join.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Querying with Athena? The 5 full-length practice sets have 14 more Querying with Athena questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets