exam questions

Exam AWS Certified Data Engineer - Associate DEA-C01 All Questions

View all questions & answers for the AWS Certified Data Engineer - Associate DEA-C01 exam

Exam AWS Certified Data Engineer - Associate DEA-C01 topic 1 question 155 discussion

A data engineer needs to create a new empty table in Amazon Athena that has the same schema as an existing table named old_table.

Which SQL statement should the data engineer use to meet this requirement?

  • A. CREATE TABLE new_table AS SELECT * FROM old_tables;
  • B. INSERT INTO new_table SELECT * FROM old_table;
  • C. CREATE TABLE new_table (LIKE old_table);
  • D. CREATE TABLE new_table AS (SELECT * FROM old_table) WITH NO DATA;
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
AgboolaKun
5 months, 3 weeks ago
Selected Answer: D
D is the correct answer. Here is why: The AS clause allows you to define the new table's schema based on a SELECT statement. The WITH NO DATA clause at the end explicitly tells Athena to create the table structure without copying any data. For more information, see the "Creating an empty copy of an existing table" section in this documentation - https://docs.aws.amazon.com/athena/latest/ug/ctas-examples.html
upvoted 2 times
...
Eleftheriia
6 months ago
Selected Answer: D
with no data, creates a new table with the same schema as the old one. https://docs.aws.amazon.com/athena/latest/ug/create-table-as.html
upvoted 1 times
...
pikuantne
6 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
Parandhaman_Margan
6 months, 1 week ago
Answer: D
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago