Databricks Certified Data Engineer Associate — Question 113
A data engineer has joined an existing project and they see the following query in the project repository:
CREATE STREAMING LIVE TABLE loyal_customers AS
SELECT customer_id -
FROM STREAM(LIVE.customers)
WHERE loyalty_level = 'high';
Which of the following describes why the STREAM function is included in the query?
Answer options
- A. The STREAM function is not needed and will cause an error.
- B. The data in the customers table has been updated since its last run.
- C. The customers table is a streaming live table.
- D. The customers table is a reference to a Structured Streaming query on a PySpark DataFrame.
Correct answer: C
Explanation
The correct answer is C because the STREAM function is used to indicate that the customers table is a streaming live table, allowing real-time data processing. Option A is incorrect as the STREAM function is indeed necessary, while option B is misleading as it does not address the function's purpose. Option D is also incorrect because it describes a different context that does not align with the use of the STREAM function.