7. [Repositories] Configuring Data Expectations6. Group By Expectations Is Unique
Feedback

6 - Group-by Expectations: “Is Unique”

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

📖 Task Introduction

The flight_alerts_joined_passengers doesn't strictly have a primary key, but the combination of the passenger_id and alert_display_name should be unique. Let's set aside the decision about whether the transform should generate a unique primary key and for now add a check that validates the uniqueness of these two columns combined and fails the job if it encounters a duplicate combination.

🔨 Task Instructions

  1. Open your flight_alert_metrics_logic repository to the flight_alerts_joined_passengers.py code file.

  2. Branch from Master.

  3. Add the appropriate import statements and check syntax following the guidance in this documentation entry.

  4. Preview, commit, and build your code on your branch, merging into Master when appropriate.