Skip to content

Commit

Permalink
Merge pull request #74 from fivetran/bugfix/invoice_line_item_uniqueness
Browse files Browse the repository at this point in the history
update uniqueness test
  • Loading branch information
fivetran-reneeli authored Apr 17, 2024
2 parents 1f5823d + b147150 commit 4bfb2b3
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 16 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# dbt_stripe_source v0.11.1
[PR [#74](https://github.com/fivetran/dbt_stripe_source/pull/74)] includes the following updates:

## Bug Fix
- Removes the `unique_invoice_line_item_id` uniqueness test in `stg_stripe__invoice_line_item`. This is because `unique_invoice_line_item_id` (`unique_id` in the raw source `invoice_line_item` table) was part of an older version of Stripe that was brought forth to help migrate internal references. See the Stripe [API update](https://stripe.com/docs/upgrades#2019-12-03) for more information. The Fivetran connector persists this in order to resolve the pagination break issue for invoice line items that was introduced by the [API update](https://stripe.com/docs/upgrades#2019-12-03).
- Furthermore the column definition for `unique_invoice_line_item_id` (`unique_id` in the raw source `invoice_line_item` table) has been made more specific:
> "A unique id generated and only for old invoice line item ID's from a past version of the API. The introduction of this field resolves the pagination break issue for invoice line items, which was introduced by the [Stripe API update](https://stripe.com/docs/upgrades#2019-12-03)."
# dbt_stripe_source v0.11.0
[PR #72](https://github.com/fivetran/dbt_stripe_source/pull/72) includes the following updates:

Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'stripe_source'
version: '0.11.0'
version: '0.11.1'
require-dbt-version: [">=1.3.0", "<2.0.0"]

models:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

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.

10 changes: 5 additions & 5 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ integration_tests:
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: stripe_source_integrations_tests_3
schema: stripe_source_integrations_tests_4
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: stripe_source_integrations_tests_3
schema: stripe_source_integrations_tests_4
threads: 8
keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}"
snowflake:
Expand All @@ -33,7 +33,7 @@ integration_tests:
role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}"
database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}"
warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}"
schema: stripe_source_integrations_tests_3
schema: stripe_source_integrations_tests_4
threads: 8
postgres:
type: postgres
Expand All @@ -42,13 +42,13 @@ integration_tests:
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: stripe_source_integrations_tests_3
schema: stripe_source_integrations_tests_4
threads: 8
databricks:
catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}"
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
schema: stripe_source_integrations_tests_3
schema: stripe_source_integrations_tests_4
threads: 2
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
type: databricks
4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
config-version: 2

name: 'stripe_source_integration_tests'
version: '0.11.0'
version: '0.11.1'


profile: 'integration_tests'

vars:
stripe_schema: stripe_source_integrations_tests_3
stripe_schema: stripe_source_integrations_tests_4
stripe_source:
stripe_account_identifier: "account_data"
stripe_group_identifier: "group_data"
Expand Down
4 changes: 2 additions & 2 deletions models/src_stripe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ sources:
description: The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
- name: type
description: A string identifying the type of the source of this line item, either an invoice item or a subscription.
- name: unique_invoice_line_item_id
description: A unique id generated for old invoice ID's from a past version of the API
- name: unique_id
description: A unique id generated and only for old invoice line item ID's from a past version of the API. The introduction of this field resolves the pagination break issue for invoice line items, which was introduced by the [Stripe API update](https://stripe.com/docs/upgrades#2019-12-03).
- name: livemode
description: Indicates if this is a test invoice line item.

Expand Down
4 changes: 1 addition & 3 deletions models/stg_stripe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,7 @@ models:
- name: type
description: A string identifying the type of the source of this line item, either an invoice item or a subscription.
- name: unique_invoice_line_item_id
description: A unique id generated for old invoice line item ID's from a past version of the API
tests:
- unique
description: A unique id generated and only for old invoice line item ID's from a past version of the API. The introduction of this field resolves the pagination break issue for invoice line items, which was introduced by the [Stripe API update](https://stripe.com/docs/upgrades#2019-12-03).
- name: period_start
description: Start of the usage period during which invoice items were added to this invoice.
- name: period_end
Expand Down

0 comments on commit 4bfb2b3

Please sign in to comment.