Databricks Data Engineer Associate exam dumps

Databricks Data Engineer Associate practice question 414 of 532

Databricks Certified Data Engineer Associate. Associate level, Databricks. Free question with the correct answer and a full explanation.

Databricks Data Engineer Associate Question 414

Select 2

You are managing a Delta Live Tables (DLT) pipeline that has failed during execution. The error message indicates a syntax issue in one of the SQL-based notebooks. Upon reviewing the code, you find the following statements:

  1. CREATE TABLE customers_silver AS SELECT * FROM STREAM(customers_bronze);
  2. CREATE customers_gold AS SELECT * FROM LIVE.customers_silver WHERE status = 'active';

What corrections should you make to resolve the syntax issues in these statements?

  1. A

    Replace 'STREAM(customers_bronze)' with 'LIVE.customers_bronze' in the first statement.

  2. B

    Add the keyword 'TABLE' after 'CREATE' in the second statement.

  3. C

    Replace 'LIVE.customers_silver' with 'STREAM(customers_silver)' in the second statement.

  4. D

    Add the keyword 'LIVE' before 'customers_silver' in the first statement.

  5. E

    Both statements are correct and no changes are needed.

Show answer and explanation

Correct answers: A, B

Explanation

In Delta Live Tables, the 'LIVE' keyword is used to reference tables or views defined within the pipeline, while 'STREAM' is used in the 'FROM' clause to read from a streaming source. The first statement incorrectly uses 'STREAM(customers_bronze)' instead of 'LIVE.customers_bronze'. Additionally, the 'CREATE' statement in DLT requires the 'TABLE' keyword, which is missing in the second statement. Correcting these issues will resolve the pipeline error.

  • A. Correct.

    Correct: In DLT, you must use 'LIVE' to refer to upstream tables or views defined within the pipeline. 'STREAM' is not valid here; you should replace 'STREAM(customers_bronze)' with 'LIVE.customers_bronze'.

  • B. Correct.

    Correct: The 'CREATE' statement in DLT requires the 'TABLE' keyword when defining a new table. The second statement is missing the 'TABLE' keyword after 'CREATE'.

  • C. Incorrect.

    Incorrect: 'STREAM' should be used in the 'FROM' clause when reading from streaming sources, not for referring to upstream tables within DLT. 'LIVE.customers_silver' is correct and does not need to be replaced.

  • D. Incorrect.

    Incorrect: Adding 'LIVE' before 'customers_silver' in the first statement is incorrect because the issue lies with the use of 'STREAM(customers_bronze)', not 'customers_silver'.

  • E. Incorrect.

    Incorrect: Both statements have syntax issues and need corrections as described in the explanations for the correct options.

Timed practice exam

Take a Databricks Data Engineer Associate practice test under exam conditions

45 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam