Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releases/v0.12.latest #82

Merged
merged 12 commits into from
Jun 11, 2024
Merged

Releases/v0.12.latest #82

merged 12 commits into from
Jun 11, 2024

Conversation

fivetran-jamie
Copy link
Contributor

@fivetran-jamie fivetran-jamie commented Jun 7, 2024

PR Overview

This PR will address the following Issue/Feature:

See upstream source PR for additional issue addressed

This PR will result in the following new package version:

Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

🪲 Bug Fixes 🪛

  • Added support for a new delayed fulfillment event status from Shopify. This produces a new count_fulfillment_delayed field in the shopify__daily_shop model.

Contributors

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt run –full-refresh && dbt test
  • dbt run (if incremental models are present) && dbt test

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked, tagged, and properly assigned
  • All necessary documentation and version upgrades have been applied
  • docs were regenerated (unless this PR does not include any code or yml updates)
  • BuildKite integration tests are passing
  • Detailed validation steps have been provided below

Detailed Validation

Please share any and all of your validation steps:

See Validation tests added
image

If you had to summarize this PR in an emoji, which would it be?

@fivetran-jamie fivetran-jamie self-assigned this Jun 7, 2024
packages.yml Outdated
version: [">=0.12.0", "<0.13.0"]
# - package: fivetran/shopify_source
# version: [">=0.12.0", "<0.13.0"]
- git: https://github.com/fivetran/dbt_shopify_source.git
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update prior to merging

Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-jamie this PR looks good to me! There are a few minor comments and questions, but nothin that would block this from being approved. Please address these comments before initiating the release review, but this is good from my end otherwise!

count(distinct case when status = 'delivered' then fulfillment_id end) as count_fulfillment_delivered

from source
where happened_at > '2023-01-01' and happened_at < '2024-01-01'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this filter? My only concern with this filter is if you run the integrity validation on a data set that doesn't have data for this period then it won't validate the results effectively. Is there a concern for removing this filter and running the validation for all records?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment for the other integrity tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this was just me avoiding live-data messing things up, will adjust to be wider

count(count_customers) as count_customers,
sum(order_adjusted_total) as order_adjusted_total,
sum(count_abandoned_checkouts) as count_abandoned_checkouts,
sum(count_fulfillment_attempted_delivery) as count_fulfillment_attempted_delivery,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation must have the shopify_using_fulfillment_event variable defined as true (default: false) in order for the validation to succeed.

Would you either be able to put a conditional in here to ensure the validation runs as expected regardless of the variable being true/false. Or leave a comment to callout that the shopify_using_fulfillment_event variable must be true in order for this to succeed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i'll add a conditional

Comment on lines 49 to 51
order_metrics.count_orders as order_count_orders,
daily_shop_metrics.order_adjusted_total as daily_shop_order_adjusted_total,
order_metrics.order_adjusted_total as order_order_adjusted_total
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a coalesce here because if there are no orders at the source then the above ctes will produce null records here. To ensure the where clause at the bottom is always accurate it would be best to treat a null record as a 0.

image

Suggested change
order_metrics.count_orders as order_count_orders,
daily_shop_metrics.order_adjusted_total as daily_shop_order_adjusted_total,
order_metrics.order_adjusted_total as order_order_adjusted_total
coalesce(order_metrics.count_orders, 0) as order_count_orders,
daily_shop_metrics.order_adjusted_total as daily_shop_order_adjusted_total,
coalesce(order_metrics.order_adjusted_total, 0) as order_order_adjusted_total

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added myself

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am assuming we named this "zontal_*" because the naming was too long for the warehouses. If so, I am okay with this approach but can we update our Slab documentation on validation tests to highlight this naming convention and be sure to share the standard with the team.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol no i can update -- i was just using slang for "horizontal" for funzies

CHANGELOG.md Outdated
@@ -1,3 +1,13 @@
# dbt_shopify v0.12.1

[PR #81](https://github.com/fivetran/dbt_shopify/pull/81) includes the following updates:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest PR is #82, so I'd change this from #81 to #82 or do what you did in the source package (call out the specific change that was applied in #81 on the bug fixes line).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this line and added the PRs to the exact change line items


## 🪲 Bug Fixes 🪛
- Added support for a new `delayed` fulfillment event status from Shopify. This produces a new `count_fulfillment_delayed` field in the `shopify__daily_shop` model.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add your consistency/integrity tests as Under the Hood and that can be the #82 changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added!

@fivetran-jamie fivetran-jamie merged commit 9dc9de3 into main Jun 11, 2024
9 checks passed
ranjeetmqat added a commit to MarqueeBrands/dbt_marquee_shopify that referenced this pull request Jun 19, 2024
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.

4 participants