[Feature] Shopify test table warning
Is there an existing feature request for this?
- [X] I have searched the existing issues
Describe the Feature
Hi Guys, we are running on most recent shopify package version , and we have run in to test warining on 1 table : accepted_values_stg_shopify__fulfillment_event_status__attempted_delivery__delivered__failure__in_transit__out_for_delivery__ready_for_pickup__picked_up__label_printed__label_purchased__confirmed
the outcome of the test is just one additional fullfilment status that is missing on your list which is
delayed
would it be possible to add this status to your accepted values list ?
log-level-accepted_values_stg_shopify__fulfillment_event_status__attempted_delivery__delivered__failure__in_transit__out_for_delivery__ready_for_pickup__picked_up__label_printed__label_purchased__confirmed
Summary
Details
Download Logs
11:17:39 320 of 661 START test accepted_values_stg_shopify__fulfillment_event_status__attempted_delivery__delivered__failure__in_transit__out_for_delivery__ready_for_pickup__picked_up__label_printed__label_purchased__confirmed [RUN]
11:17:42 320 of 661 WARN 1 accepted_values_stg_shopify__fulfillment_event_status__attempted_delivery__delivered__failure__in_transit__out_for_delivery__ready_for_pickup__picked_up__label_printed__label_purchased__confirmed [WARN 1 in 2.91s]
11:30:21 Warning in test accepted_values_stg_shopify__fulfillment_event_status__attempted_delivery__delivered__failure__in_transit__out_for_delivery__ready_for_pickup__picked_up__label_printed__label_purchased__confirmed (models/stg_shopify.yml)
11:30:21 Got 1 result, configured to warn if != 0
11:30:21 compiled Code at target/compiled/shopify_source/models/stg_shopify.yml/accepted_values_stg_shopify__f_dedeafd665959576232d68017a86f88f.sql
Describe alternatives you've considered
for first one, as I said, just add status delayed on list,
Are you interested in contributing this feature?
- [ ] Yes.
- [ ] Yes, but I will need assistance and will schedule time during your office hours for guidance.
- [X] No.
Anything else?
No response
Hey there @TomaszE -- yes we can certainly add delayed to the accepted_values
We have this warning in place because we pivot out these values downstream in the shopify__daily_shop transform model in a way that is slightly hard-coded
{% for status in ['attempted_delivery', 'delivered', 'failure', 'in_transit', 'out_for_delivery', 'ready_for_pickup', 'picked_up', 'label_printed', 'label_purchased', 'confirmed']%}
, count(distinct case when lower(status) = '{{ status }}' then fulfillment_id end) as count_fulfillment_{{ status }}
{% endfor %}
So we'll also want to add it to this line in dbt_shopify as well
This is very straightforward update and we can fold it into an upcoming sprint!
@fivetran-jamie I hope you don't mind but I went ahead and opened a couple PRs to accommodate this new value as I was seeing the same error in one of the environments I'm working in. Thanks for calling out the dbt_shopify package needed to be updated as well!
https://github.com/fivetran/dbt_shopify/pull/81 https://github.com/fivetran/dbt_shopify_source/pull/84
i certainly don't mind, this is awesome 🙌 going to review your PRs so we can get them out next week!
this is live in v0.12.1! thanks @TomaszE for opening and @shreveasaurus for the PR 😤