
Answer-first summary for fast verification
Answer: Drop all rows containing `delete` and `update_preimage` in the `_change_type` column.
The correct answer is to drop all rows containing `delete` and `update_preimage` in the `_change_type` column. This ensures the `mobiles` table contains only unique values by excluding outdated or deleted records. Other options either do not affect the uniqueness of entries or incorrectly exclude necessary updates, leading to missing or duplicate records in the `mobiles` table.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
To ensure the mobiles table contains only unique entries for auditing purposes, which modification should be made to the following streaming query?
.option('readChangeFeed', 'true')
.table('customers')
.select('mobile')
.writeStream
.format('delta')
.option('checkpointLocation', '/tmp/customers/_checkpoints/')
.table('mobiles')```
.option('readChangeFeed', 'true')
.table('customers')
.select('mobile')
.writeStream
.format('delta')
.option('checkpointLocation', '/tmp/customers/_checkpoints/')
.table('mobiles')```
A
Add option('startingVersion', 0) to avoid duplicate entries in the mobiles table.
B
Drop rows where the _change_type column's value is delete or update_postimage.
C
Omit the checkpoint location from the streaming query.
D
Keep only rows with _change_type values of insert, update_postimage, and delete.
E
Drop all rows containing delete and update_preimage in the _change_type column.