Create Empty Table Copy in Amazon Athena
A data engineer needs to create an empty copy of an existing table in Amazon Athena to perform data processing tasks. The existing table in Athena contains 1,000 rows. Which query will meet this requirement?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
To create an empty table structure without copying data, use 'CREATE TABLE new_table AS SELECT * FROM old_table WHERE FALSE'.
This question tests the correct SQL syntax for creating an empty copy of an existing table in Amazon Athena using a CREATE TABLE AS SELECT (CTAS) statement with a false condition.
Learners often choose options that include a WHERE clause filtering specific data or omitting the WHERE clause entirely, which results in copying all rows instead of an empty structure.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The requirement is to create an empty copy of an existing table's schema. The correct approach is to use a CTAS (Create Table As Select) statement combined with a condition that always evaluates to false, such asWHERE FALSE or WHERE 1=0. This ensures the table structure is created based on the source table, but no rows are inserted because the query returns zero results.Why the Other Options Are Wrong
Options that copy data (e.g., without a restrictive WHERE clause) would populate the new table with the 1,000 rows, violating the "empty" requirement. Options that do not use CTAS might fail to replicate the schema correctly or require separate DDL steps. Any option missing theSELECT * or using a non-false condition will result in data duplication.Community Comment Notes
The community consensus strongly supports answer B. Users noted that the key to this question is identifying the query that creates the table structure without ingesting data. One user referenced AWS documentation confirming thatCTAS with a false predicate is the standard method for this task. Official Reference
Exam Strategy
When asked to create a table schema without data in Athena, look for a CTAS statement paired with a WHERE FALSE or WHERE 1=0 clause. This is a common pattern for partitioning strategies or pre-creating tables for future loads.
Frequently Asked Questions
Why not just CREATE TABLE like normal SQL?
In Athena, you typically need to define the schema explicitly if not using CTAS. Using CTAS with a false condition is a concise way to replicate the exact schema of an existing table instantly.
Does WHERE 1=0 work the same as WHERE FALSE?
Yes, both evaluate to false for every row, resulting in zero rows being selected. Both are valid methods to create an empty table copy via CTAS.
Related Analysis
Practice All DEA-C01 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DEA-C01 Practice Test →