
Ultimate access to all questions.
Answer-first summary for fast verification
Answer: They need to add a CREATE LIVE TABLE table_name AS line at the beginning of the query.
The correct answer is **B. They need to add a CREATE LIVE TABLE table_name AS line at the beginning of the query.** Here's the detailed explanation: In Delta Live Tables (DLT), you define tables using SQL by prefixing standard SQL queries with DLT-specific declarations. The basic syntax for creating a table is: ```sql CREATE LIVE TABLE table_name AS SELECT * FROM json.`/path/to/json/file.json`; ``` Let's examine why the other options are incorrect: * **A. They need to add a COMMENT line at the beginning of the query.** - While comments are good practice, they are not required for the query to function in DLT. * **C. They need to add a live. prefix prior to json. in the FROM line.** - The `live.` prefix is used to reference other tables within the same DLT pipeline, not to read external data sources. * **D. They need to add a CREATE DELTA LIVE TABLE table_name AS line at the beginning of the query.** - The correct keyword is `CREATE LIVE TABLE`, not `CREATE DELTA LIVE TABLE`. * **E. They need to add the cloud_files(...) wrapper to the JSON file path.** - While `cloud_files` is an excellent function for autoloader-style ingestion and is commonly used in DLT pipelines for incremental processing, it's not strictly required to convert this specific query. The original query using the `json.` data source will work in DLT when wrapped with the proper `CREATE LIVE TABLE` syntax. The `cloud_files` wrapper would be an enhancement for better pipeline performance and incremental processing, but the fundamental change needed is the DLT table creation syntax. The core requirement to convert any standard Databricks SQL query for use in a DLT pipeline is to add the appropriate DLT declaration (`CREATE LIVE TABLE...`, `CREATE LIVE VIEW...`, etc.) at the beginning.
Author: LeetQuiz .
No comments yet.
Question 34
Which of the following describes the change the colleague needs to make to the query?
A data engineer has written the following query:
SELECT *
FROM json.`/path/to/json/file.json`;
```
The data engineer asks a colleague for help to convert this query for use in a Delta Live
Tables (DLT) pipeline. The query should create the first table in the DLT pipeline.
Which of the following describes the change the colleague needs to make to the query?
SELECT *
FROM json.`/path/to/json/file.json`;
```
The data engineer asks a colleague for help to convert this query for use in a Delta Live
Tables (DLT) pipeline. The query should create the first table in the DLT pipeline.
Which of the following describes the change the colleague needs to make to the query?
A
They need to add a COMMENT line at the beginning of the query.
B
They need to add a CREATE LIVE TABLE table_name AS line at the beginning of the query.
C
They need to add a live. prefix prior to json. in the FROM line.
D
They need to add a CREATE DELTA LIVE TABLE table_name AS line at the beginning of the query.
E
They need to add the cloud_files(...) wrapper to the JSON file path.