Skip to content

Commit

Permalink
Merge pull request #11 from fivetran/bugfix/persist_docs_max_length
Browse files Browse the repository at this point in the history
shorten field descriptions
  • Loading branch information
fivetran-reneeli authored Jul 26, 2023
2 parents c8504b7 + b4ec7ce commit 99829f8
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 18 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# dbt_apple_store_source v0.3.1

## Bug Fix
[PR #11](https://github.com/fivetran/dbt_apple_store_source/pull/11) includes the following update:
- Shortened the field description for `source_type`. This was causing an error if the persist docs config was enabled because the description size exceeded warehouse constraints.

# dbt_apple_store_source v0.3.0

## Bug Fixes
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_source'
version: '0.3.0'
version: '0.3.2'
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.

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.

2 changes: 1 addition & 1 deletion integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ integration_tests:
schema: apple_store_source_integrations_tests
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: apple_store_source_integrations_tests
Expand Down
7 changes: 6 additions & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2

name: 'apple_store_source_integration_tests'
version: '0.3.0'
version: '0.3.2'

profile: 'integration_tests'

Expand All @@ -26,6 +26,11 @@ vars:
usage_source_type_device_report_identifier: "usage_source_type_device"
usage_territory_source_type_report_identifier: "usage_territory_source_type"

models:
+persist_docs:
relation: "{{ false if target.type in ('spark','databricks') else true }}"
columns: "{{ false if target.type in ('spark','databricks') else true }}"

seeds:
apple_store_source_integration_tests:
+quote_columns: "{{ true if target.type == 'redshift' else false }}"
Expand Down
4 changes: 3 additions & 1 deletion integration_tests/seeds/app_store_territory_source_type.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ app_id,date,source_type,territory,meets_threshold,impressions,_fivetran_synced,i
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
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
12345,2021-11-26 00:00:00+00:00,App Store Search,Turkey,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,Türkiye,True,0,2022-01-02 12:34:56.789000+00:00,0,0,3
13 changes: 4 additions & 9 deletions models/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,8 @@ subscription offers, introductory offers, and marketing opt-ins. Subscriptions a
{% docs region_code %} The UN Statistics region numerical code assignment. ([Original Source](https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes/blob/master/all/all.csv)) {% enddocs %}

{% docs source_type %} A source is counted when a customer follows a link to your App Store product page.
Source Types include:
- Unavailable: Sales and usage data display sources as unavailable if users downloaded your app before App Analytics started tracking source attribution on April 15, 2017. As users download your app for the first time, you will see more complete sources data. If a user downloads your app using an App Store gift card or promotional code, the source type will also show as unavailable.
- App Store Browse: Users viewed your app or tapped to download it while browsing the App Store (for example, in the Today, Games, or Apps sections).
- App Store Search: Users viewed your app or downloaded it from Search on the App Store. Includes Search Ads in App Store search.
- Institutional Purchase: Users downloaded your app from Apple Business Manager or Apple School Manager.
- App Referrer: Users tapped a link in an app that brought them to your App Store product page. Includes apps using the StoreKit API to load your product page. Includes Apple apps, such as Messages, except Safari.
- App Clip: Users tapped a link in your App Clip that brought them to your App Store product page. If the user then downloaded your app, the resulting Download is attributed to your App Clip as the source.
- Web Referrer: Users tapped a link from a website that brought them to your App Store product page. If a chain of redirects in Safari leads to your App Store product page, the referring website will be the last URL in the chain.
- Null: This is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary.
There are 8 types of sources: App Store Browse, App Store Search, App Referrers, Web Referrers, App Clips, Unavailable, Institutional Purchases, and Null. Null is the default value for data that does not provide source types, including: crashes, subscription events and subscription summary.
More information can be found in the Apple App Store developer [docs](https://developer.apple.com/help/app-store-connect/view-app-analytics/view-acquisition-sources/).
{% enddocs %}

{% docs state %} The state associated with the subscription event metrics or subscription summary metrics. {% enddocs %}
Expand All @@ -93,6 +86,8 @@ Source Types include:

{% docs total_downloads %} Total Downloads is the sum of Redownloads and First Time Downloads. {% enddocs %}

{% docs territory_long %} Either the alternative country name, or the country name if the alternative doesn't exist. {% enddocs %}




Expand Down
2 changes: 1 addition & 1 deletion models/stg_apple_store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ models:
- source_type
- platform_version
columns:
- name: date
- name: date_day
description: '{{ doc("date_day") }}'
- name: app_id
description: '{{ doc("app_id") }}'
Expand Down

0 comments on commit 99829f8

Please sign in to comment.