
Answer-first summary for fast verification
Answer: The customers table is a streaming live table.
The correct answer is **C: The customers table is a streaming live table.** The `STREAM()` wrapper is used when reading from a source that should be treated as an incremental stream in a streaming live table query. [stackoverflow](https://stackoverflow.com/questions/77684821/what-are-stream-and-readstream-functions-in-databricks-dlt-sql/77685200) ## Why In Databricks SQL, `STREAM(LIVE.<table>)` tells the pipeline to read the upstream live table as a streaming source rather than as a static snapshot. This is why it appears in `CREATE STREAMING LIVE TABLE ... AS SELECT ...` statements when the input should be processed incrementally. [docs.azure](https://docs.azure.cn/en-us/databricks/ldp/dbsql/streaming) ## Why the other choices are wrong - **A** is wrong because `STREAM()` is valid in this context and does not inherently cause an error. [stackoverflow](https://stackoverflow.com/questions/77684821/what-are-stream-and-readstream-functions-in-databricks-dlt-sql/77685200) - **B** is wrong because the fact that the table being created is a live table does not by itself explain the need for `STREAM()`; the wrapper is about how the input is read. [docs.databricks](https://docs.databricks.com/aws/en/ldp/streaming-tables) - **D** is wrong because this is not a reference to a PySpark Structured Streaming DataFrame. [docs.databricks](https://docs.databricks.com/aws/en/structured-streaming/concepts) - **E** is wrong because `STREAM()` is not used to indicate that data changed since the last run; it indicates streaming/incremental ingestion behavior. [learn.microsoft](https://learn.microsoft.com/en-us/azure/databricks/structured-streaming/concepts) ## Exam tip If you see `STREAM(LIVE.some_table)`, think: **“read this upstream live table as a streaming source.”** [docs.databricks](https://docs.databricks.com/aws/en/ldp/streaming-tables)
Author: Keng Suppaseth
Ultimate access to all questions.
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';
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?
A
The STREAM function is not needed and will cause an error.
B
The table being created is a live table.
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.
E
The data in the customers table has been updated since its last run.