QuestionQ279
VerifiedData Processing & TransformationsA developer is building a data pipeline that processes records from a bronze table into a silver table. The bronze table, bronze_events, contains duplicate records due to at-least-once delivery guarantees from the upstream ingestion system. The developer writes the following PySpark code to prepare the data:

After running dropDuplicates() without arguments, the developer notices that some rows that differ only in the event_timestamp column still remain. The developer wants to deduplicate the data based only on the user_id and event_type columns, keeping one row per unique combination of these two columns.
Which code change achieves this deduplication requirement?
Community Discussion