QuestionQ224

VerifiedData Transformation, Cleansing, and Quality

A data engineer is building a data-ingestion pipeline to determine where customers take rented bicycles while using them. Over time, the engineer observes that data sent by bicycle sensors fails to include important details such as latitude and longitude. Downstream analysts require both clean records and quarantined records to be available for separate processing.

The data engineer already has this code:

Question Image

How should the data engineer satisfy the requirements for capturing good and bad data?

Explanation

A quarantine flag calculated as NOT (lat IS NOT NULL AND long IS NOT NULL) marks records missing either required coordinate. Keeping all rows in a table partitioned by that flag lets downstream processing access valid and quarantined records separately. expect_all applies the quality expectations and records metrics but does not discard invalid rows; the drop variants would remove those rows from the target dataset.

Learn more

Community Discussion

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