Databricks Data Engineer Associate Question 415
Single answerYou are troubleshooting a Delta Live Tables (DLT) pipeline and encounter an error stating: 'SyntaxError: LIVE keyword missing in CREATE statement.' Which of the following changes should you make to resolve this issue?
- A
Ensure that all table creation statements in the pipeline use the LIVE keyword before the table name.
- B
Add the STREAM keyword into the FROM clause for all input data sources.
- C
Verify that the data sources being referenced exist in the specified location.
- D
Remove the LIVE keyword from all table creation statements.
Show answer and explanation
Correct answer: A
Explanation
The LIVE keyword is mandatory in Delta Live Tables pipelines when defining tables or views in a CREATE statement. This ensures that the table or view is managed by the DLT pipeline. The error message specifically points to the absence of the LIVE keyword, so adding it to the CREATE statement resolves the issue.
- A. Correct.
Correct. The LIVE keyword is required in Delta Live Tables pipelines for CREATE statements to define tables or views that are managed by the pipeline.
- B. Incorrect.
Incorrect. The STREAM keyword is used in the FROM clause for streaming data sources, but the error message specifically pertains to the CREATE statement, not the FROM clause.
- C. Incorrect.
Incorrect. While ensuring data sources exist is a good practice, it is unrelated to the specific error about the missing LIVE keyword.
- D. Incorrect.
Incorrect. Removing the LIVE keyword will not resolve the issue, as the error indicates it is required.