Executing queries using Databricks SQL and Databricks SQL Warehouses1 / 5
How does an analyst use CTAS (CREATE TABLE AS SELECT) to materialize query results?
CorrectIncorrect
Alex
CREATE TABLE AS SELECT (CTAS) executes the SELECT query and writes results into a new managed Delta table in one atomic statement. The schema is inferred from the SELECT—you cannot specify columns explicitly in a CTAS. Common patterns: materializing expensive aggregations for dashboards, creating date-partitioned snapshots, or building cleaned/transformed tables. Distractor analysis: The option “CTAS executes the SELECT as a streaming job…” is wrong—CTAS is batch, not streaming, and needs no COMMIT. The option “CTAS registers the SELECT query as a view…” is wrong—CTAS creates a physical table, not a materialized view. The option “CTAS creates a schema-only table structure using the SELECT…” is wrong—CTAS both creates the schema and populates data in one step. Ref: docs.databricks.com/en/delta/tutorial.html; docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-create-table-using.html
Sourcedocs.databricks.com
Follow-up answers are available in the app. Create a free account — no credit card required.
Question 1 of 5
Create a free account