Skip to content

Add is_closed column in the orders table#42

Draft
popcornylu wants to merge 1 commit intomainfrom
feature/demo-change-category
Draft

Add is_closed column in the orders table#42
popcornylu wants to merge 1 commit intomainfrom
feature/demo-change-category

Conversation

@popcornylu
Copy link

This is a demo for categorizing changes. For a modified model, we can classify changes into the following categories:

  • Breaking change: The change affects all downstream models.
  • Partial breaking change: The change affects only downstream models that use the modified columns.
  • Non-breaking change: The change does not impact any downstream models.

By using this categorization, we can more accurately evaluate the impact radius, allowing us to pinpoint which models are actually affected.

@github-actions
Copy link

github-actions bot commented Jan 6, 2025

Recce Summary

Manifest Information

Manifest Catalog
Base 2024-11-05 07:49:11 2024-11-05 07:49:12
Current 2025-01-14 08:58:14 2025-01-14 08:58:15

Lineage Graph

graph LR
model.jaffle_shop.stg_orders["stg_orders

[What's Changed]
Code, Schema"]
style model.jaffle_shop.stg_orders stroke:#ffa502
model.jaffle_shop.stg_orders---->model.jaffle_shop.orders
model.jaffle_shop.stg_orders---->model.jaffle_shop.customers
model.jaffle_shop.orders["orders

[What's Changed]
Code, Schema"]
style model.jaffle_shop.orders stroke:#ffa502
model.jaffle_shop.customers["customers

[What's Changed]
"]
model.jaffle_shop.customers---->model.jaffle_shop.customer_segments
model.jaffle_shop.customers---->model.jaffle_shop.customer_order_pattern
model.jaffle_shop.customer_segments["customer_segments"]
model.jaffle_shop.customer_order_pattern["customer_order_pattern"]

Loading

Checks Summary

Checks Run Data Mismatch Detected
4 2

Checks of Data Mismatch Detected

Name Type Mismatched Nodes
Model schema of customers, orders and modified nodes Schema Diff stg_orders, orders
Row count of customers, orders and modified table model Row Count Diff orders

See PR page: https://cloud.datarecce.io/DataRecce/jaffle_shop_duckdb/pulls/42

How to check the recce result

# Launch the recce server based on the state file
recce server --review --cloud --password yummy_jaffle

# Open the recce server http://localhost:8000 by your browser

@popcornylu popcornylu force-pushed the feature/demo-change-category branch from 1507595 to ef6b13f Compare January 10, 2025 03:32
Signed-off-by: popcorny <celu@infuseai.io>
@popcornylu popcornylu force-pushed the feature/demo-change-category branch from ef6b13f to d7872b7 Compare January 14, 2025 08:57
@popcornylu
Copy link
Author

Summary

PR #42 adds an is_closed column to the orders table as a demonstration of change categorization. The changes affect the customers model with logic modifications that impact downstream models (customer_segments, customer_order_pattern) while maintaining identical schema, row counts, and data quality metrics.


Key Changes

  • Modified models: orders.sql and stg_orders.sql files updated
  • Logic update: Addition of is_closed column in orders table (+2/-1 net changes in orders.sql, +2/-3 in stg_orders.sql)
  • Data consistency: No schema changes detected; all row counts remain at 1,856 records across affected models
  • Downstream impact: Changes propagate to customer_segments and customer_order_pattern models
  • Data quality maintained: All column metrics remain identical between base and current environments

Impact Analysis

graph LR
    stg_customers["stg_customers<br/>(view)"]:::unchanged
    stg_orders["stg_orders<br/>(view)"]:::unchanged
    stg_payments["stg_payments<br/>(view)"]:::unchanged
    customers["customers<br/>(table)"]:::modified
    customer_segments["customer_segments<br/>(table)"]:::impacted
    customer_order_pattern["customer_order_pattern<br/>(table)"]:::impacted

    stg_customers --> customers
    stg_orders --> customers
    stg_payments --> customers
    customers --> customer_segments
    customers --> customer_order_pattern

    classDef modified fill:#fff3cd,stroke:#ffc107,color:#000
    classDef impacted fill:#ffffff,stroke:#ffc107,color:#000
    classDef unchanged fill:#ffffff,stroke:#d3d3d3,color:#999
Loading
  • No schema changes: Zero columns added, removed, or type-changed across all affected models
  • ⚠️ Downstream impacted: customer_segments and customer_order_pattern inherit changes from modified customers model
  • Row count stable: All models maintain 1,856 records - no data volume changes
  • Data quality unchanged: All statistical profiles (null%, distinct count, min/max/avg) identical between environments
  • Logic-only modification: Changes are internal transformations without altering the final dataset dimensions

☑️ Checklist

No checks configured in the PR.

Note: Consider implementing dbt tests or Recce checks to validate data quality and transformations as part of the PR review process.


🔍 Suggested Actions

  • Verify is_closed column logic: Review the logic for the new is_closed column to ensure it correctly categorizes order statuses as intended
  • Validate downstream metrics: Although row counts are stable, manually verify that customer_segments and customer_order_pattern segmentation is accurate with the new column
  • Add dbt tests: Implement tests for the is_closed column (null checks, valid value checks, distribution validation)
  • Document change categorization: Ensure PR description clearly documents whether this is a breaking, partial breaking, or non-breaking change per the categorization framework mentioned
  • Review dependent reports: Check any downstream dashboards or reports that depend on customers to ensure they display correctly with the new column

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant