APICS Certified Supply Chain Professional (CSCP) — Question 344
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 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.
Correct answer: C
Explanation
The correct answer is C because the STREAM function indicates that the customers table is being treated as a streaming data source, which is essential for creating a streaming live table. Options A and B are incorrect as they misrepresent the necessity and purpose of the STREAM function. Option D inaccurately describes the nature of the customers table, and option E does not address the function of the STREAM keyword in the context provided.