Case Study¶
Schema drift¶
This is schema drift because the source file structure changed by adding a new column: discount.
A data engineer should:
- Detect the schema change.
- Decide whether the new column is valid.
- Update the staging table/schema if the column is expected.
- Add validation tests.
- Update downstream models if reporting needs the new discount column.
- Alert or fail the pipeline if unexpected columns appear.
Airflow DAG failed at load_to_bigquery¶
- Airflow task logs and error message.
- BigQuery credentials/service account permissions.
- Target dataset/table existence and schema compatibility.
- Input file/path availability in GCS or local storage.
- Data type issues, nulls, or bad records.
- BigQuery quota, network, or API errors.
Data Quality Checks¶
- order_id is not null.
- order_id is unique.
- amount is not negative.
- order_date is not in the future.
- customer_id exists in the customer dimension.
- Required columns exist with the correct data types.
- Row count is within an expected
range.