PR #91 includes the following changes:
- Adds enable/disable config for the
metadata
staging model using theshopify_using_metafield
variable (defaulttrue
). - Adds enable/disable config for the
abandoned_checkout
staging models using theshopify_using_abandoned_checkout
variable (defaulttrue
):stg_shopify__abandoned_checkout
stg_shopify__abandoned_checkout_discount_code
stg_shopify__abandoned_checkout_shipping_line
- For more information on how to enable/disable these tables, refer to the README. This will be a breaking change if you choose to disable these tables.
- Updates the
index
calculation instg_shopify__abandoned_checkout_discount_code
by removing the conditional logic for null scenarios now that a disable config has been added to the model.
- Added support for a new
delayed
fulfillment event status from Shopify.delayed
has been added to theaccepted_values
test onstg_shopify__fulfillment_event
(PR #84). - Added
product_id
to the uniquecombination_of_columns
test for thestg_shopify__product_image
model (PR #86).
PR #79 introduces the following changes:
- To reduce storage, updated default materialization of staging models from tables to views.
- Note that
stg_shopify__metafield
will still be materialized as a table for downstream use.
- Note that
β οΈ Running a--full-refresh
will be required if you have previously run these staging models as tables and get the following error:Trying to create view <model path> but it currently exists as a table. Either drop <model path> manually, or run dbt with `--full-refresh` and dbt will drop it for you.
- Updated the maintainer PR template to the current format.
- Added integration testing pipeline for Databricks SQL Warehouse.
PR #81 introduces the following changes:
- Removed the
index
filter instg_shopify__order_discount_code
, as we were erroneously filtering out multiple discounts for an order sinceindex
is meant to pair withorder_id
as the unique identifier for this source. - Added
index
as a field instg_shopify__order_discount_code
, as it is part of the primary key.
- Added
index
documentation to oursrc_shopify.yml
andstg_shopify.yml
. - Updated the
unique_combination_of_columns
test onstg_shopify__order_discount_code
to correctly check onindex
withorder_id
andsource_relation
rather thancode
.
- Updated the pull request templates.
PR #78 introduces the following changes:
- Added
source_relation
to thepartition_by
clauses that determine theis_most_recent_record
in thestg_shopify__metafield
table. - Added
source_relation
to thepartition_by
clauses that determines theindex
in thestg_shopify__abandoned_checkout_discount_code
table. - If the user is leveraging the union feature, this could change data values.
- Updated partition logic in
stg_shopify__metafield
andstg_shopify__abandoned_checkout_discount_code
to account for null table Redshift errors when handling null field cases.
- Included auto-releaser GitHub Actions workflow to automate future releases.
- Added additional casting in seed dependencies for above models
integration_tests/dbt_project.yml
to ensure local testing passed on null cases.
- This release will be a breaking change due to the removal of below dependencies.
- Removes the dependency on dbt-expectations and updates the dbt-date dependency to the latest version. (PR #75)
- In June 2023 the Shopify connector received an update which upgraded the connector to be compatible with the new 2023-04 Shopify API. As a result, the following fields have been removed as they were deprecated in the API upgrade: (PR #70)
model | field removed |
---|---|
stg_shopify__customer | lifetime_duration |
stg_shopify__order_line | fulfillment_service |
stg_shopify__order_line | destination_location_* fields |
stg_shopify__order_line | origin_location_* fields |
stg_shopify__order | total_price_usd |
stg_shopify__order | processing_method |
- Removed
databricks
from the shopify_database configuration in thesrc_shopify.yml
to allow Databricks Unity catalog users to define a unity Catalog as a database. (PR #70)
- Documentation provided in the README for how to connect sources when leveraging the union schema/database feature. (PR #70)
PR #69 includes the following fixes:
- Lower casing
metafield_reference
field instg_shopify__metafield
to fix metafield table breakages upstream when thekey
field has different casing for otherwise identical strings. - Lower casing
owner_resource
field instg_shopify__metafield
to ensure identicalvalue
fields with different casing are then correctly pivoted together upstream in the shopify transformation packageget_metafields
macro.
- Incorporated the new
fivetran_utils.drop_schemas_automation
macro into the end of each Buildkite integration test job. (PR #65) - Updated the pull request templates. (PR #65)
PR #59 introduces the following changes:
- The
fivetan_utils.union_data
macro has been expanded to handle checking if a source table exists. Previously in the Shopify source package, this check happened outside of the macro and depended on the user having a defined shopifysource
. If the package anticipates a table that you do not have in any schema or database, it will return a completely empty table (ielimit 0
) that will work seamlessly with downstream transformations.- A compilation message will be raised when a staging model is completely empty. This compiler warning can be turned off by the end user by setting the
fivetran__remove_empty_table_warnings
variable toTrue
(see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).
- A compilation message will be raised when a staging model is completely empty. This compiler warning can be turned off by the end user by setting the
- A uniqueness test has been placed on the
order_line_id
,index
, andsource_relation
columns instg_shopify__tax_line
, as it was previously missing a uniqueness test.
- Addresses Issue #54, in which the deprecated
discount_id
field was used instead ofcode
instg_shopify__abandoned_checkout_discount__code
(PR #56).
Lots of new features ahead!! We've revamped the package to keep up-to-date with new additions to the Shopify connector and feedback from the community.
This release includes π¨ Breaking Changes π¨.
- Created the DECISIONLOG to log discussions and opinionated stances we took in designing the package (PR #45).
- README updated for easier package use and navigation (PR #38).
- Ensured Postgres compatibility (PR #38).
- Got rid of the
shopify__using_order_adjustment
,shopify__using_order_line_refund
, andshopify__using_refund
variables. Instead, the package will automatically create empty versions of the related models until the sourcerefund
,order_line_refund
, andorder_adjustment
tables exist in your schema. See DECISIONLOG for more details (PR #45). - Adjusts the organization of the
get_<table>_columns()
macros (PR #39, PR #40).
- Addition of the
shopify_timezone
variable, which converts ALL timestamps included in the package (including_fivetran_synced
) to a single target timezone in IANA Database format, ie "America/Los_Angeles" (PR #41). shopify_<default_source_table_name>_identifier
variables added if an individual source table has a different name than the package expects (PR #38).- The declaration of passthrough variables within your root
dbt_project.yml
has changed (but is backwards compatible). To allow for more flexibility and better tracking of passthrough columns, you will now want to define passthrough columns in the following format (PR #40):
This applies to all passthrough columns within the
dbt_shopify_source
package and not just thecustomer_pass_through_columns
example. See the README for which models have passthrough columns.
vars:
customer_pass_through_columns:
- name: "my_field_to_include" # Required: Name of the field within the source.
alias: "field_alias" # Optional: If you wish to alias the field within the staging model.
transform_sql: "cast(field_alias as string)" # Optional: If you wish to define the datatype or apply a light transformation.
- The following fields have been added to (β) or removed from (β) their respective staging models (PR #39, PR #40):
stg_shopify__order
:- β
total_discounts_set
- β
total_line_items_price_set
- β
total_price_usd
- β
total_price_set
- β
total_tax_set
- β
total_tip_received
- β
is_deleted
- β
app_id
- β
checkout_id
- β
client_details_user_agent
- β
customer_locale
- β
order_status_url
- β
presentment_currency
- β
is_confirmed
- β
stg_shopify__customer
:- β
note
- β
lifetime_duration
- β
currency
- β
marketing_consent_state
(coalescing ofemail_marketing_consent_state
and deprecatedaccepts_marketing
field) - β
marketing_opt_in_level
(coalescing ofemail_marketing_consent_opt_in_level
and deprecatedmarketing_opt_in_level
field) - β
marketing_consent_updated_at
(coalescing ofemail_marketing_consent_consent_updated_at
and deprecatedaccepts_marketing_updated_at
field) - β
accepts_marketing
/has_accepted_marketing
- β
accepts_marketing_updated_at
- β
marketing_opt_in_level
- β
stg_shopify__order_line_refund
:- β
subtotal_set
- β
total_tax_set
- β
stg_shopify__order_line
:- β
pre_tax_price_set
- β
price_set
- β
tax_code
- β
total_discount_set
- β
variant_title
- β
variant_inventory_management
- β
properties
- ( )
is_requiring_shipping
is renamed tois_shipping_required
- β
stg_shopify__product
:- β
status
- β
stg_shopify__product_variant
- β
old_inventory_quantity
-> coalesced withinventory_quantity
- β
inventory_quantity
-> coalesced withold_inventory_quantity
- β
- The following source tables have been added to the package with respective staging models (PR #39):
abandoned_checkout
collection_product
collection
customer_tag
discount_code
-> if the table does not exist in your schema, the package will create an empty staging model and reference that (PR #47, see DECISIONLOG)fulfillment
inventory_item
inventory_level
location
metafield
(#PR 49 as well)order_note_attribute
order_shipping_line
order_shipping_tax_line
order_tag
order_url_tag
price_rule
product_image
product_tag
shop
tender_transaction
abandoned_checkout_discount_code
order_discount_code
tax_line
abandoned_checkout_shipping_line
((PR #47) as well)fulfillment_event
-> This is NOT included by default. To include fulfillment events (used in theshopify__daily_shop
model), set theshopify_using_fulfillment_event
variable totrue
(PR #48)
PR #36 includes the following breaking changes:
- Dispatch update for dbt-utils to dbt-core cross-db macros migration. Specifically
{{ dbt_utils.<macro> }}
have been updated to{{ dbt.<macro> }}
for the below macros:any_value
bool_or
cast_bool_to_text
concat
date_trunc
dateadd
datediff
escape_single_quotes
except
hash
intersect
last_day
length
listagg
position
replace
right
safe_cast
split_part
string_literal
type_bigint
type_float
type_int
type_numeric
type_string
type_timestamp
array_append
array_concat
array_construct
- For
current_timestamp
andcurrent_timestamp_in_utc
macros, the dispatch AND the macro names have been updated to the below, respectively:dbt.current_timestamp_backcompat
dbt.current_timestamp_in_utc_backcompat
- Dependencies on
fivetran/fivetran_utils
have been upgraded, previously[">=0.3.0", "<0.4.0"]
now[">=0.4.0", "<0.5.0"]
.
π dbt v1.0.0 Compatibility π
-
Adjusts the
require-dbt-version
to now be within the range [">=1.0.0", "<2.0.0"]. Additionally, the package has been updated for dbt v1.0.0 compatibility. If you are using a dbt version <1.0.0, you will need to upgrade in order to leverage the latest version of the package.- For help upgrading your package, I recommend reviewing this GitHub repo's Release Notes on what changes have been implemented since your last upgrade.
- For help upgrading your dbt project to dbt v1.0.0, I recommend reviewing dbt-labs upgrading to 1.0.0 docs for more details on what changes must be made.
-
Upgrades the package dependency to refer to the latest
dbt_fivetran_utils
. The latestdbt_fivetran_utils
package also has a dependency ondbt_utils
[">=0.8.0", "<0.9.0"].- Please note, if you are installing a version of
dbt_utils
in yourpackages.yml
that is not in the range above then you will encounter a package dependency error.
- Please note, if you are installing a version of
-
The
union_schemas
andunion_databases
variables have been replaced withshopify_union_schemas
andshopify_union_databases
respectively. This allows for multiple packages with the union ability to be used and not locked to a single variable that is used across packages.
- Rearranged the ordering of the columns within the
get_order_columns
macro. This ensure the output of the models within the downstream Shopify Holistic Reporting package are easier to understand and interpret. (#29)
Refer to the relevant release notes on the Github repository for specific details for the previous releases. Thank you!