DP-600 · Question #138
You have a Fabric tenant that contains a warehouse named DW1 and a lakehouse named LH1. DW1 contains a table named Sales.Product. LH1 contains a table named Sales.Orders. You plan to schedule an…
The correct answer is B. CREATE TABLE AS SELECT (CTAS). CREATE TABLE AS SELECT (CTAS) creates a new table and automatically infers column names and data types directly from the result set of the SELECT query - no manual schema definition needed. Since the query joins Sales.Product (in DW1) and Sales.Orders (in LH1 via cross-database…
Question
You have a Fabric tenant that contains a warehouse named DW1 and a lakehouse named LH1. DW1 contains a table named Sales.Product. LH1 contains a table named Sales.Orders. You plan to schedule an automated process that will create a new point-in-time (PIT) table named Sales.ProductOrder in DW1. Sales.ProductOrder will be built by using the results of a query that will join Sales.Product and Sales.Orders. You need to ensure that the types of columns in Sales.ProductOrder match the column types in the source tables. The solution must minimize the number of operations required to create the new table. Which operation should you use?
Options
- AINSERT INTO
- BCREATE TABLE AS SELECT (CTAS)
- CCREATE TABLE AS CLONE OF
- DCREATE MATERIALIZED VIEW AS SELECT
How the community answered
(28 responses)- A4% (1)
- B71% (20)
- C11% (3)
- D14% (4)
Explanation
CREATE TABLE AS SELECT (CTAS) creates a new table and automatically infers column names and data types directly from the result set of the SELECT query - no manual schema definition needed. Since the query joins Sales.Product (in DW1) and Sales.Orders (in LH1 via cross-database query), CTAS captures the correct column types from both sources in a single operation. INSERT INTO requires the target table to already exist. CREATE TABLE AS CLONE OF copies an existing table's structure and data as-is - it cannot produce a join result. A materialized view is a persistent virtual object used for query optimization, not a physical point-in-time snapshot table.
Topics
Community Discussion
No community discussion yet for this question.