Skip to content

Commit

Permalink
test severity and note
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-jamie committed Jan 11, 2023
1 parent 6279e49 commit 7d548c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion DECISIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ Thus, the source package will create empty (1 row of all `NULL` fields) staging
## Keeping Deleted Entities

todo - not filtering out _fivetran_deleted in staging models. when joining these tables together in the transform package, bring in _fivetran_deleted as is_<foreign key table>_deleted
todo - not filtering out _fivetran_deleted in staging models. when joining these tables together in the transform package, bring in _fivetran_deleted as is_<foreign key table>_deleted

## Accepted Value Test Severity

We test the following columns for accepted values because their values are hard-coded to be pivoted out into columns and/or used as `JOIN` conditions in downstream models.
- `stg_shopify__price_rule.target_type`: accepted values are `line_item`, `shipping_line`
- `stg_shopify__price_rule.value_type`: accepted values are `percentage`, `fixed_amount`
- `stg_shopify__fulfillment.status`: accepted values are `pending`, `open`, `success`, `cancelled`, `error`, `failure`

We have chosen to make the severity of these tests `warn`, as non-accepted values will be filtered out in the transformation models. They will not introduce erroneous data.
2 changes: 2 additions & 0 deletions models/stg_shopify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,8 @@ models:
tests:
- accepted_values:
values: ['percentage', 'fixed_amount']
config:
severity: warn # we use these in a JOIN condition in shopify__discounts

- name: stg_shopify__product_image
description: Table storing hosted images of products.
Expand Down

0 comments on commit 7d548c9

Please sign in to comment.