New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon-DEA-C01 Exam - Topic 3 Question 23 Discussion

Actual exam question for Amazon's Amazon-DEA-C01 exam
Question #: 23
Topic #: 3
[All Amazon-DEA-C01 Questions]

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.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: D

Problem Analysis:

The goal is to create a new empty table in Athena with the same schema as an existing table (old_table).

The solution must avoid copying any data.

Key Considerations:

CREATE TABLE AS (CTAS) is commonly used in Athena for creating new tables based on an existing table.

Adding the WITH NO DATA clause ensures only the schema is copied, without transferring any data.

Solution Analysis:

Option A: Copies both schema and data. Does not meet the requirement for an empty table.

Option B: Inserts data into an existing table, which does not create a new table.

Option C: Creates an empty table but does not copy the schema.

Option D: Creates a new table with the same schema and ensures it is empty by using WITH NO DATA.

Final Recommendation:

Use D. CREATE TABLE new_table AS (SELECT * FROM old_table) WITH NO DATA to create an empty table with the same schema.


Athena CTAS Queries

CREATE TABLE Statement in Athena

Contribute your Thoughts:

0/2000 characters
Fabiola
14 hours ago
Definitely going with Option B, it’s straightforward.
upvoted 0 times
...
Alonso
6 days ago
I think Option C is better, it looks cleaner.
upvoted 0 times
...
Hermila
11 days ago
Option A is the correct syntax for creating a new table with the same schema.
upvoted 0 times
...
Lynelle
16 days ago
Option B is the clear winner here, no doubt about it.
upvoted 0 times
...
Dominga
21 days ago
Haha, Option C reminds me of that time I tried to create a table with a typo in the name.
upvoted 0 times
...
Yolando
26 days ago
Option A seems a bit too simple, I'd go with Option D.
upvoted 0 times
...
Nieves
1 month ago
I think I saw a similar question where we had to specify the existing table's name. I just can't recall if it was in the `CREATE TABLE` statement or somewhere else.
upvoted 0 times
...
Rebbecca
1 month ago
I feel like I might confuse the syntax for creating an empty table versus copying data. I hope I remember the right one!
upvoted 0 times
...
Verlene
1 month ago
I remember practicing a question about duplicating a table's schema, and I think it involved using `LIKE`. Maybe that's in one of the options?
upvoted 0 times
...
Dierdre
2 months ago
I think we need to use the `CREATE TABLE AS` syntax, but I'm not sure if that's the right option here.
upvoted 0 times
...
Reita
2 months ago
I'm confident that Option B is the way to go here. The "CREATE TABLE AS SELECT" statement is the perfect solution for creating a new table with the same schema as an existing one.
upvoted 0 times
...
Annice
2 months ago
Option C seems interesting, but I'm not sure if it's the right approach for this specific requirement. I'll need to double-check the documentation to be sure.
upvoted 0 times
...
Tayna
2 months ago
I think Option B is the way to go.
upvoted 0 times
...
Keneth
2 months ago
Option C looks good to me.
upvoted 0 times
...
Aleta
3 months ago
Yeah, I’m torn between A and B.
upvoted 0 times
...
Xochitl
3 months ago
Wait, can you really create an empty table like that? Sounds too easy!
upvoted 0 times
...
Roselle
3 months ago
Hmm, I'm a bit unsure here. I'll need to carefully review the syntax of each option to make sure I understand the differences between them.
upvoted 0 times
...
Ozell
3 months ago
This looks straightforward. I think Option B is the correct answer since it creates a new table with the same schema as the existing "old-table".
upvoted 0 times
Nelida
2 months ago
I agree, Option B seems right.
upvoted 0 times
...
...

Save Cancel