exam questions

Exam DP-600 All Questions

View all questions & answers for the DP-600 exam

Exam DP-600 topic 1 question 80 discussion

Actual exam question from Microsoft's DP-600
Question #: 80
Topic #: 1
[All DP-600 Questions]

You have a Fabric tenant that contains a warehouse named Warehouse1. Warehouse1 contains two schemas name schema1 and schema2 and a table named schema1.city.

You need to make a copy of schema1.city in schema2. The solution must minimize the copying of data.

Which T-SQL statement should you run?

  • A. INSERT INTO schema2.city SELECT * FROM schema1.city;
  • B. SELECT * INTO schema2.city FROM schema1.city;
  • C. CREATE TABLE schema2.city AS CLONE OF schema1.city;
  • D. CREATE TABLE schema2.city AS SELECT * FROM schema1.city;
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
neoverma
Highly Voted 1 year, 2 months ago
The “CREATE TABLE … AS CLONE OF” statement is the most efficient way to create a copy of a table in the same Fabric tenant. This statement creates a new table in the specified schema that is an exact clone of the source table, including the table structure, data, and indexes. This approach minimizes the amount of data copied, as it simply creates a reference to the underlying data rather than performing a full table scan and data copy. Options A and B, which use INSERT INTO or SELECT INTO, would require scanning the entire source table and copying the data row-by-row, which is less efficient than the CLONE method. Option D, CREATE TABLE … AS SELECT, would also work to create a copy of the table, but it would perform a full table scan and data copy, which is less efficient than the CLONE approach.
upvoted 30 times
utsuha
1 year ago
To clarify, AS CLONE OF does not copy the data. See this documentation: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-as-clone-of-transact-sql?view=fabric Option C will only copy over the metadata of table schema1.city, so I guess it is minimizing the copying of data by copying no data, lol. Option D is most correct if we want to duplicate the table itself, data and metadata. I'm sure the question is just slightly worded wrong and the intended correct answer is C, i.e. we only want to make a copy of the metadata.
upvoted 6 times
Karthiknaidu123
9 months, 2 weeks ago
utsuha, the question clearly mentions "The solution must minimize the copying of data." That's why, IMO option C is correct.
upvoted 3 times
...
Pegooli
10 months, 3 weeks ago
no copy data but pointing to source data.
upvoted 1 times
...
DarioReymago
11 months, 4 weeks ago
Tested option D "clone" is the best because clone is like a link to original source
upvoted 1 times
DarioReymago
11 months, 4 weeks ago
I mean tested I select option C "CREATE TABLE schema2.city AS CLONE OF schema1.city;"
upvoted 1 times
...
...
...
...
clux
Highly Voted 1 year, 2 months ago
Selected Answer: C
https://learn.microsoft.com/en-us/fabric/data-warehouse/clone-table Microsoft Fabric offers the capability to create near-instantaneous zero-copy clones with minimal storage costs.
upvoted 6 times
...
Rataxe
Most Recent 2 months, 1 week ago
Selected Answer: D
The schemas are existing so the correct answer is CREATE TABLE schema2.city AS SELECT * FROM schema1.city;
upvoted 1 times
...
paffy
8 months, 1 week ago
Selected Answer: C
should be C, since copying of data should be minimized
upvoted 1 times
...
cafb698
9 months, 2 weeks ago
Selected Answer: D
CLONE AS Creates a new table as a zero-copy clone of another table in Warehouse in Microsoft Fabric. Only the metadata of the table is copied. The underlying data of the table, stored as parquet files, is not copied. A zero-copy clone creates a replica of the table by copying the metadata, while still referencing the same data files in OneLake. The metadata is copied while the underlying data of the table stored as parquet files is not copied. The creation of a clone is similar to creating a table within a Warehouse in Microsoft Fabric.
upvoted 1 times
cafb698
9 months, 2 weeks ago
I stand corrected. Though what I mentioned above is correct, there's a trick in the question. The requirement is not to copy the data, it is to MINIMIZE the copying of data. Which will happen in the case of CLONE AS. Hence, C is the correct answer.
upvoted 1 times
...
...
sandy789
11 months, 4 weeks ago
go with D. C is a clone of table's metadata not copy data activity
upvoted 2 times
...
vernillen
1 year ago
Selected Answer: C
AS CLONE basically minimizes the copying of data. That's the biggest requirement.
upvoted 3 times
...
PiyushT
1 year ago
C. CREATE TABLE schema2.city AS CLONE OF schema1.city; This statement creates a new table named city in schema2 that has the same structure as the city table in schema1 without copying any data. It essentially creates a metadata reference to the original table, which minimizes the data copying.
upvoted 2 times
...
282b85d
1 year ago
Option A: INSERT INTO schema2.city SELECT * FROM schema1.city; This option assumes that schema2.city already exists. It will insert data into schema2.city but will not create the table. Option B: SELECT * INTO schema2.city FROM schema1.city; This option copies data from schema1.city to schema2.city but is typically used in SQL Server to create a new table and copy data. However, it doesn't handle schema changes well and might not be the best for large datasets. Option C: CREATE TABLE schema2.city AS CLONE OF schema1.city; This is not a valid T-SQL syntax for creating tables. Option D: CREATE TABLE schema2.city AS SELECT * FROM schema1.city; This statement creates a new table schema2.city and copies all data from schema1.city into it (CTAS). This option is efficient for creating a new table with the same schema and data as the original table.
upvoted 1 times
...
4fbcd40
1 year ago
Selected Answer: D
D is the correct answer. Only the metadata of the table is copied. The underlying data of the table, stored as parquet files, is not copied. https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-as-clone-of-transact-sql?view=fabric
upvoted 2 times
...
stilferx
1 year ago
IMHO, C is good. Because: Within a warehouse, a clone of a table can be created near-instantaneously using simple T-SQL. A clone of a table can be created within or across schemas in a warehouse. Here: https://learn.microsoft.com/en-us/fabric/data-warehouse/clone-table#creation-of-a-table-clone
upvoted 3 times
...
dp600
1 year, 1 month ago
Selected Answer: C
I would go with C, is the fastest way to replicate the schema.
upvoted 1 times
...
Nefirs
1 year, 1 month ago
Selected Answer: C
C is correct - Cloning reduces data movement
upvoted 2 times
...
Jasneet
1 year, 1 month ago
Selected Answer: C
C is correct
upvoted 1 times
...
AGTraining
1 year, 2 months ago
Selected Answer: D
d is the write answer
upvoted 3 times
neoverma
1 year, 2 months ago
why? any explanation or reference to help learn?
upvoted 2 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 ...