QuestionQ262

VerifiedStructured Streaming

A data engineer notices that an upstream streaming source feeds the event table frequently and produces duplicate records. After examining the current production table, the engineer determines that duplicate records differ in the event_timestamp column by no more than 30 minutes.

To remove duplicates, the engineer adds this code:

dropDuplicatesWithinWatermark("event_tuinestamp", "30 minutes")

What is the outcome?

Explanation

dropDuplicatesWithinWatermark removes duplicates only after a watermark has been configured on the streaming DataFrame with withWatermark. Its arguments are duplicate-comparison column names, not a timestamp column and a watermark duration. Therefore, this call does not configure the required 30-minute watermark and cannot perform the intended deduplication; it also references event_tuinestamp rather than event_timestamp.

Learn more

Community Discussion

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