Skip to content

Commit

Permalink
Merge pull request #65 from fivetran/contributor/fee-test-update
Browse files Browse the repository at this point in the history
Contributor/fee test update
  • Loading branch information
fivetran-joemarkiewicz authored Apr 17, 2023
2 parents 0bfc21d + 91f4ec5 commit 4be5791
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ export CI_SNOWFLAKE_DBT_USER=$(gcloud secrets versions access latest --secret="C
export CI_SNOWFLAKE_DBT_WAREHOUSE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_WAREHOUSE" --project="dbt-package-testing-363917")
export CI_DATABRICKS_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HOST" --project="dbt-package-testing-363917")
export CI_DATABRICKS_DBT_HTTP_PATH=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HTTP_PATH" --project="dbt-package-testing-363917")
export CI_DATABRICKS_DBT_TOKEN=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_TOKEN" --project="dbt-package-testing-363917")
export CI_DATABRICKS_DBT_TOKEN=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_TOKEN" --project="dbt-package-testing-363917")
export CI_DATABRICKS_DBT_CATALOG=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_CATALOG" --project="dbt-package-testing-363917")
1 change: 1 addition & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ steps:
- "CI_DATABRICKS_DBT_HOST"
- "CI_DATABRICKS_DBT_HTTP_PATH"
- "CI_DATABRICKS_DBT_TOKEN"
- "CI_DATABRICKS_DBT_CATALOG"
commands: |
bash .buildkite/scripts/run_models.sh databricks
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.9.2
PR [#64](https://github.com/fivetran/dbt_stripe_source/pull/64) includes the following updates:
## Bug Fixes
- The `stg_stripe__fee` uniqueness test has been updated to also consider the `index` when determining the unique combination of columns. As there may be many indexes to a single fee, the uniqueness test has been updated to account for this scenario.

## Contributors
- [@jmussitsch](https://github.com/jmussitsch) ([#64](https://github.com/fivetran/dbt_stripe_source/pull/64))

# dbt_stripe_source v0.9.1
PR [#61](https://github.com/fivetran/dbt_stripe_source/pull/61) includes the following updates:
## Feature 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.9.1'
version: '0.9.2'
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.

12 changes: 6 additions & 6 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
schema: stripe_source_integrations_tests_1
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: stripe_source_integrations_tests
schema: stripe_source_integrations_tests_1
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
schema: stripe_source_integrations_tests_1
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
schema: stripe_source_integrations_tests_1
threads: 8
databricks:
catalog: null
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
schema: stripe_source_integrations_tests_1
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.9.1'
version: '0.9.2'


profile: 'integration_tests'

vars:
stripe_schema: stripe_source_integrations_tests
stripe_schema: stripe_source_integrations_tests_1
stripe_source:
stripe_account_identifier: "account_data"
stripe_group_identifier: "group_data"
Expand Down
2 changes: 2 additions & 0 deletions models/src_stripe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ sources:
columns:
- name: balance_transaction_id
description: ID of the balance transaction entry the fee applies to
- name: index
description: The index of the fee within the balance transaction
- name: amount
description: Amount of the fee, in cents.
- name: application
Expand Down
3 changes: 3 additions & 0 deletions models/stg_stripe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,15 @@ models:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- balance_transaction_id
- index
- source_relation
columns:
- name: balance_transaction_id
description: ID of the balance transaction entry the fee applies to
tests:
- not_null
- name: index
description: The index of the fee within the balance transaction
- name: amount
description: Amount of the fee, in cents.
- name: application
Expand Down
1 change: 1 addition & 0 deletions models/stg_stripe__fee.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ final as (

select
balance_transaction_id,
index,
amount,
application,
currency,
Expand Down

0 comments on commit 4be5791

Please sign in to comment.