Skip to content

Commit

Permalink
Merge pull request #11 from fivetran/bug/add-alt-country-names
Browse files Browse the repository at this point in the history
Bug/add alt country names
  • Loading branch information
fivetran-jamie authored May 3, 2023
2 parents 45a87ab + 59d834d commit 6ab1e31
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 20 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# dbt_apple_store v0.UPDATE.UPDATE
# dbt_apple_store v0.3.0

## Under the Hood:
## Bug Fixes
[PR #11](https://github.com/fivetran/dbt_apple_store/pull/11) includes the following changes:
- This version of the transform package points to a [breaking change in the source package](https://github.com/fivetran/dbt_apple_store_source/blob/main/CHANGELOG.md) in which the [country code](https://github.com/fivetran/dbt_apple_store_source/blob/main/seeds/apple_store_country_codes.csv) mapping table was updated to align with Apple's [format and inclusion list](https://developer.apple.com/help/app-store-connect/reference/app-store-localizations/) of country names.
- This is a 🚨**breaking change**🚨 as you will need to re-seed (`dbt seed --full-refresh`) the `apple_store_country_codes` file again.

## Under the Hood:
[PR #10](https://github.com/fivetran/dbt_apple_store/pull/10) includes the following changes:
- Incorporated the new `fivetran_utils.drop_schemas_automation` macro into the end of each Buildkite integration test job.
- Updated the pull request [templates](/.github).

# dbt_apple_store v0.2.0

## 🚨 Breaking Changes 🚨:
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Include the following apple_store package version in your `packages.yml` file:
```yaml
packages:
- package: fivetran/apple_store
version: [">=0.2.0", "<0.3.0"] # we recommend using ranges to capture non-breaking changes automatically
version: [">=0.3.0", "<0.4.0"] # we recommend using ranges to capture non-breaking changes automatically
```
Do NOT include the `apple_store_source` package in this file. The transformation package itself has a dependency on it and will install the source package as well.
Expand All @@ -71,7 +71,13 @@ vars:
apple_store__using_subscriptions: true # by default this is assumed to be false
```

## (Optional) Step 5: Additional configurations
## Step 5: Seed `country_codes` mapping table (once)

In order to map longform territory names to their ISO country codes, we have adapted the CSV from [lukes/ISO-3166-Countries-with-Regional-Codes](https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes) to align with Apple's country output [format](https://developer.apple.com/help/app-store-connect/reference/app-store-localizations/).

You will need to `dbt seed` the `apple_store_country_codes` [file](https://github.com/fivetran/dbt_apple_store_source/blob/main/seeds/apple_store_country_codes.csv) just once.

## (Optional) Step 6: Additional configurations
<details><summary>Expand for configurations</summary>

### Defining subscription events
Expand Down Expand Up @@ -108,7 +114,7 @@ vars:
```
</details>

## (Optional) Step 6: Orchestrate your models with Fivetran Transformations for dbt Core™
## (Optional) Step 7: Orchestrate your models with Fivetran Transformations for dbt Core™
<details><summary>Expand for details</summary>
<br>

Expand All @@ -122,7 +128,7 @@ This dbt package is dependent on the following dbt packages. Please be aware tha
```yml
packages:
- package: fivetran/apple_store_source
version: [">=0.2.0", "<0.3.0"]
version: [">=0.3.0", "<0.4.0"]
- package: fivetran/fivetran_utils
version: [">=0.4.0", "<0.5.0"]
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'apple_store'
version: '0.2.0'
version: '0.3.0'
config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
vars:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 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.

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: apple_store_integration_tests
schema: apple_store_integration_tests_1
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: apple_store_integration_tests
schema: apple_store_integration_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: apple_store_integration_tests
schema: apple_store_integration_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: apple_store_integration_tests
schema: apple_store_integration_tests_1
threads: 8
databricks:
catalog: null
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
schema: apple_store_integration_tests
schema: apple_store_integration_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,12 +1,12 @@
config-version: 2

name: 'apple_store_integration_tests'
version: '0.2.0'
version: '0.3.0'

profile: 'integration_tests'

vars:
apple_store_schema: apple_store_integration_tests
apple_store_schema: apple_store_integration_tests_1
apple_store__using_subscriptions: True
apple_store_source:
app_identifier: "app"
Expand Down
5 changes: 5 additions & 0 deletions integration_tests/seeds/app_store_territory_source_type.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ app_id,date,source_type,territory,meets_threshold,impressions,_fivetran_synced,i
12345,2021-05-09 00:00:00+00:00,App Store Browse,Canada,True,0,2022-01-02 12:34:56.789000+00:00,0,0,0
12345,2021-05-18 00:00:00+00:00,App Store Search,Canada,True,3,2022-01-02 12:34:56.789000+00:00,2,1,1
12345,2021-10-21 00:00:00+00:00,App Store Search,Canada,True,0,2022-01-02 12:34:56.789000+00:00,0,0,0
12345,2021-10-23 00:00:00+00:00,App Store Search,Kosovo,True,0,2022-01-02 12:34:56.789000+00:00,0,0,0
12345,2021-11-24 00:00:00+00:00,App Store Search,Kosovo,True,0,2022-01-02 12:34:56.789000+00:00,0,0,3
12345,2021-10-24 00:00:00+00:00,App Store Search,Côte d'Ivoire,True,0,2022-01-02 12:34:56.789000+00:00,0,0,3
12345,2021-10-26 00:00:00+00:00,App Store Search,Cote d'Ivoire,True,0,2022-01-02 12:34:56.789000+00:00,0,0,3
12345,2021-11-26 00:00:00+00:00,App Store Search,Cote d'Ivoire,True,0,2022-01-02 12:34:56.789000+00:00,0,0,3
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/apple_store_source
version: [">=0.2.0", "<0.3.0"]
version: [">=0.3.0", "<0.4.0"]

0 comments on commit 6ab1e31

Please sign in to comment.