
Explanation:
Option B is CORRECT because the CREATE TABLE AS SELECT (CTAS) statement with the WITH NO DATA clause creates a new table (new_table) with the same schema as the existing table (old_table) without copying any rows. This is the correct method in Athena to create an empty copy of a table for further data processing tasks.
Ultimate access to all questions.
Question 54/60
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?
A
CREATE TABLE new_table LIKE old_table;
B
CREATE TABLE new_table AS SELECT * FROM old_table WITH NO DATA;
C
CREATE TABLE new_table AS SELECT * FROM old_table;
D
CREATE TABLE new_table AS SELECT * FROM old_cable WHERE 1=1;
No comments yet.