A data engineer is using the following code block as part of a batch ingestion pipeline to read from a composable table:
Which of the following changes needs to be made so this code block will work when the transactions table is a stream source?
A data engineer is using the following code block as part of a batch ingestion pipeline to read from a composable table:
Which of the following changes needs to be made so this code block will work when the transactions table is a stream source?
To enable the code block to work when the transactions table is a stream source, you need to replace 'spark.read' with 'spark.readStream'. The 'readStream' method is specifically designed to read streams of data, in contrast to 'read', which is intended for batch processing.
Example from https://docs.databricks.com/en/structured-streaming/delta-lake.html spark.readStream.table("table_name") spark.readStream.load("/path/to/table")
have you cleared the exam
Ans E; for streaming source you use readstream. https://docs.databricks.com/en/structured-streaming/delta-lake.html
https://docs.databricks.com/en/structured-streaming/tutorial.html#use-auto-loader-to-read-streaming-data-from-object-storage
E is ok