Skip to content

Commit

Permalink
Revert "Releases/v0.12.latest (fivetran#82)"
Browse files Browse the repository at this point in the history
This reverts commit 9dc9de3.
  • Loading branch information
ranjeetmqat committed Jun 19, 2024
1 parent 79e5c98 commit 4d6c833
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 269 deletions.
11 changes: 0 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# dbt_shopify v0.12.1

## 🪲 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 ([PR #81](https://github.com/fivetran/dbt_shopify/pull/81)).

## 🚘 Under the Hood 🚘
- Added validation tests to be used by package maintainers to evaluate the consistency and integrity of subsequent model updates ([PR #82](https://github.com/fivetran/dbt_shopify/pull/82)).

## Contributors
- [@shreveasaurus](https://github.com/shreveasaurus) ([PR #81](https://github.com/fivetran/dbt_shopify/pull/81))

# dbt_shopify v0.12.0

[PR #76](https://github.com/fivetran/dbt_shopify/pull/76) includes the following updates:
Expand Down
4 changes: 2 additions & 2 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'shopify'
version: '0.12.1'
version: '0.12.0'
config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
models:
Expand Down Expand Up @@ -47,4 +47,4 @@ vars:
shopify_abandoned_checkout_discount_code: "{{ ref('stg_shopify__abandoned_checkout_discount_code') }}"
shopify_order_discount_code: "{{ ref('stg_shopify__order_discount_code') }}"
shopify_abandoned_checkout_shipping_line: "{{ ref('stg_shopify__abandoned_checkout_shipping_line') }}"
shopify_fulfillment_event: "{{ ref('stg_shopify__fulfillment_event') }}"
shopify_fulfillment_event: "{{ ref('stg_shopify__fulfillment_event') }}"
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'shopify_integration_tests'
version: '0.12.1'
version: '0.12.0'
profile: 'integration_tests'
config-version: 2

Expand Down Expand Up @@ -55,7 +55,6 @@ dispatch:
models:
shopify:
+schema: "{{ 'shopify_integrations_tests_sqlw' if target.name == 'databricks-sql' else 'shopify' }}"
# +schema: "shopify_{{ var('directed_schema','dev') }}"

seeds:
shopify_integration_tests:
Expand Down Expand Up @@ -192,4 +191,4 @@ seeds:
shopify_tax_line_data:
+column_types:
price: float
rate: float
rate: float
2 changes: 1 addition & 1 deletion integration_tests/seeds/shopify_fulfillment_event_data.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id,_fivetran_synced,address_1,city,country,created_at,estimated_delivery_at,fulfillment_id,happened_at,latitude,longitude,message,order_id,province,shop_id,status,updated_at,zip,_fivetran_deleted
451435,2022-11-18 04:39:07.945000,,,,2022-08-29 20:52:39.000000,,40495,2022-08-29 20:52:39.000000,,,,4502987,,89440612,delivered,2022-08-29 20:52:39.000000,,false
48779,2022-11-18 05:48:01.773000,,LONDON,GB,2022-09-13 08:07:57.000000,,4064737,2022-08-15 12:41:00.000000,101.349998474121094,-14.0333000011742115,Delay,4588203,,320612,out_for_delivery,2022-09-13 08:07:57.000000,CR0,false
1481515,2022-11-18 05:41:00.745000,,ECHO PARK,AU,2022-09-14 14:16:52.000000,2022-09-14 08:00:00.000000,4019339,2022-09-14 01:26:00.000000,-3.797698974609375,190.783958203125,Delay,451915,,89320612,delayed,2022-09-14 14:16:52.000000,2759,false
1481515,2022-11-18 05:41:00.745000,,ECHO PARK,AU,2022-09-14 14:16:52.000000,2022-09-14 08:00:00.000000,4019339,2022-09-14 01:26:00.000000,-3.797698974609375,190.783958203125,Delay,451915,,89320612,out_for_delivery,2022-09-14 14:16:52.000000,2759,false
558955,2022-11-18 10:51:24.286000,,LAZYTOWN,US,2022-08-13 12:40:26.000000,,402947,2022-03-01 10:36:39.000000,22.337699890136719,-71.731002807617188,Delay,429188587,MA,89420612,in_transit,2022-08-13 12:40:26.000000,01505,false
6904235,2022-11-18 08:58:00.458000,,LA,US,2022-08-24 06:29:21.000000,2022-08-24 23:59:59.000000,4060491,2022-08-24 05:30:57.000000,12.287498474121094,-21.3573989868164,Delay,4242667,MA,89420612,in_transit,2022-08-24 06:29:21.000000,01760,false
91 changes: 0 additions & 91 deletions integration_tests/tests/consistency/consistency_daily_shop.sql

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion models/intermediate/int_shopify__daily_fulfillment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fulfillment_aggregates as (
source_relation,
cast({{ dbt.date_trunc('day','happened_at') }} as date) as date_day

{% for status in ['attempted_delivery', 'delayed', 'delivered', 'failure', 'in_transit', 'out_for_delivery', 'ready_for_pickup', 'picked_up', 'label_printed', 'label_purchased', 'confirmed']%}
{% 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 %}

Expand Down
2 changes: 0 additions & 2 deletions models/shopify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1139,8 +1139,6 @@ models:
description: Count of distinct fulfillments for which a shipping label has been purchased (but not printed yet) on this day.
- name: count_fulfillment_confirmed
description: Count of confirmed distinct fulfillments. This is the default status when no other information is available about a fulfillment.
- name: count_fulfillment_delayed
description: Count of delayed distinct fulfillments.
- name: avg_line_item_count
description: Average line item count for orders placed on this day.
- name: avg_discount
Expand Down
4 changes: 2 additions & 2 deletions models/shopify__daily_shop.sql
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ final as (
coalesce(daily_abandoned_checkouts.count_customer_emails_abandoned_checkout, 0) as count_customer_emails_abandoned_checkout

{% if var('shopify_using_fulfillment_event', false) %}
{% for status in ['attempted_delivery', 'delayed', 'delivered', 'failure', 'in_transit', 'out_for_delivery', 'ready_for_pickup', 'picked_up', 'label_printed', 'label_purchased', 'confirmed']%}
{% for status in ['attempted_delivery', 'delivered', 'failure', 'in_transit', 'out_for_delivery', 'ready_for_pickup', 'picked_up', 'label_printed', 'label_purchased', 'confirmed']%}
, coalesce(count_fulfillment_{{ status }}, 0) as count_fulfillment_{{ status }}
{% endfor %}
{% endif %}
Expand All @@ -119,4 +119,4 @@ final as (


select *
from final
from final
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: fivetran/shopify_source
version: [">=0.12.0", "<0.13.0"]
version: [">=0.12.0", "<0.13.0"]

0 comments on commit 4d6c833

Please sign in to comment.