Ultimate access to all questions.
A data engineering team is working on a Proof of Concept (POC) that involves populating a downstream table from a source table with Change Data Feed enabled. The source table has 45 columns, and the downstream table requires 47 columns, including two additional columns: typeOfChange
to indicate the type of change and version
to signify the version number of the change. The target table must be truncated and reloaded with new data upon each query execution. Given the following code snippet with blanks to fill, which option correctly completes the code to achieve the desired outcome?
spark.read.format(‘delta‘) \
.option(‘readChangeFeed‘, ‘true‘) \
.option(‘startingVersion‘, 0) \
.table(‘sourceTable‘) \
_______(1)________ \
_______(2)________ \
.write \
.format(‘delta‘) \
_______(3)________ \
.saveAsTable(‘targetTable‘)