QuestionQ74

VerifiedDeveloping Code for Data Processing using Python and SQL

A nightly task loads data into a Delta Lake table with the following code:

Question Image

The pipeline’s next step needs a function that returns an object for manipulating new records that have not yet been processed into the next pipeline table. Which code snippet finishes this function definition?

def new_records():  
Explanation

spark.readStream.table("bronze") creates a streaming DataFrame from the registered Delta table. With the default streaming behavior, it processes newly appended table records, allowing the downstream pipeline to transform them before writing to the next table.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!