Skip to content

Commit

Permalink
Merge pull request #5 from fivetran/dev/pr-fixes
Browse files Browse the repository at this point in the history
Dev/pr fixes
  • Loading branch information
fivetran-sheringuyen authored May 27, 2022
2 parents edb7cbd + d7488ca commit 5623e4d
Show file tree
Hide file tree
Showing 40 changed files with 92 additions and 76 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
contact_links:
- name: Provide feedback to our dbt package team
url: https://www.surveymonkey.com/r/DQ7K7WW
about: Fill out our survey form to provide valuable feedback to the Fivetran team developing and maintaining the dbt packages.
- name: Ask a question during our office hours
url: https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours
about: Schedule time during the external office hours block with the Fivetran Analytics Engineering team for support
Expand Down
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Pull Request
**Are you a current Fivetran customer?**
<!--- Please tell us your name, title and company -->

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ vars:
apple_store_database: your_destination_name
apple_store_schema: your_schema_name
```
## Step 3: Disable models for non-existent sources
## Step 3: Enabling additional models
Your Apple App Store connector may not sync every table that this package expects. If you use subscriptions and have the `sales_subscription_event_summary` and `sales_subscription_summary` tables synced, add the following variable to your `dbt_project.yml` file:

```yml
Expand Down Expand Up @@ -82,7 +82,7 @@ If an individual source table has a different name than the package expects, add

```yml
vars:
apple_store_<default_source_table_name>_identifier: your_table_name
<default_source_table_name>_identifier: your_table_name
```

</details>
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.

38 changes: 18 additions & 20 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,25 @@ version: '0.1.0'
profile: 'integration_tests'

vars:
apple_store_schema: apple_store_source_integration_tests
apple_store__using_subscriptions: True
apple_store_source:
app: "{{ ref('app') }}"
app_store_device: "{{ ref('app_store_source_type_device') }}"
usage_device: "{{ ref('usage_source_type_device') }}"
downloads_device: "{{ ref('downloads_source_type_device') }}"

app_store_territory: "{{ ref('app_store_territory_source_type') }}"
downloads_territory: "{{ ref('downloads_territory_source_type') }}"
usage_territory: "{{ ref('usage_territory_source_type') }}"

app_store_platform_version: "{{ ref('app_store_platform_version_source_type') }}"
crashes_platform_version: "{{ ref('crashes_platform_version') }}"
downloads_platform_version: "{{ ref('downloads_platform_version_source_type') }}"
usage_platform_version: "{{ ref('usage_platform_version_source_type') }}"

crashes_app_version: "{{ ref('crashes_app_version') }}"
usage_app_version: "{{ ref('usage_app_version_source_type') }}"

sales_account: "{{ ref('sales_account') }}"
sales_subscription_events: "{{ ref('sales_subscription_events') }}"
sales_subscription_summary: "{{ ref('sales_subscription_summary') }}"
app_identifier: "app"
app_store_platform_version_source_type_report_identifier: "app_store_platform_version_source_type"
app_store_source_type_device_report_identifier: "app_store_source_type_device"
app_store_territory_source_type_report_identifier: "app_store_territory_source_type"
crashes_app_version_device_report_identifier: "crashes_app_version"
crashes_platform_version_device_report_identifier: "crashes_platform_version"
downloads_platform_version_source_type_report_identifier: "downloads_platform_version_source_type"
downloads_source_type_device_report_identifier: "downloads_source_type_device"
downloads_territory_source_type_report_identifier: "downloads_territory_source_type"
sales_account_identifier: "sales_account"
sales_subscription_event_summary_identifier: "sales_subscription_events"
sales_subscription_summary_identifier: "sales_subscription_summary"
usage_app_version_source_type_report_identifier: "usage_app_version_source_type"
usage_platform_version_source_type_report_identifier: "usage_platform_version_source_type"
usage_source_type_device_report_identifier: "usage_source_type_device"
usage_territory_source_type_report_identifier: "usage_territory_source_type"

seeds:
apple_store_source_integration_tests:
Expand Down
4 changes: 2 additions & 2 deletions models/src_apple_store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ sources:
loader: Fivetran
loaded_at_field: _fivetran_synced

freshness:
freshness:
warn_after: {count: 48, period: hour}
error_after: {count: 72, period: hour}
error_after: {count: 168, period: hour}

tables:
- name: app
Expand Down
4 changes: 2 additions & 2 deletions models/stg_apple_store__app.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__app_tmp') }}

),

fields as (
Expand All @@ -28,4 +27,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__app_store_device.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__app_store_device_tmp') }}

),

fields as (
Expand Down Expand Up @@ -33,4 +32,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__app_store_platform_version.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__app_store_platform_version_tmp') }}

),

fields as (
Expand Down Expand Up @@ -33,4 +32,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__app_store_territory.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__app_store_territory_tmp') }}

),

fields as (
Expand Down Expand Up @@ -33,4 +32,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__crashes_app_version.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__crashes_app_version_tmp') }}

),

fields as (
Expand All @@ -30,4 +29,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__crashes_platform_version.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__crashes_platform_version_tmp') }}

),

fields as (
Expand All @@ -30,4 +29,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__downloads_device.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ with base as (

select *
from {{ ref('stg_apple_store__downloads_device_tmp') }}

),

fields as (
Expand Down Expand Up @@ -31,4 +30,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__downloads_platform_version.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ with base as (

select *
from {{ ref('stg_apple_store__downloads_platform_version_tmp') }}

),

fields as (
Expand Down Expand Up @@ -31,4 +30,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__downloads_territory.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ with base as (

select *
from {{ ref('stg_apple_store__downloads_territory_tmp') }}

),

fields as (
Expand Down Expand Up @@ -31,4 +30,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__sales_account.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__sales_account_tmp') }}

),

fields as (
Expand All @@ -27,4 +26,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__sales_subscription_events.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with base as (

select *
from {{ ref('stg_apple_store__sales_subscription_events_tmp') }}

),

fields as (
Expand Down Expand Up @@ -40,4 +39,5 @@ final as (
{{ dbt_utils.group_by(8) }}
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__sales_subscription_summary.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ with base as (

select *
from {{ ref('stg_apple_store__sales_subscription_summary_tmp') }}

),

fields as (
Expand Down Expand Up @@ -42,4 +41,5 @@ final as (
{{ dbt_utils.group_by(7) }}
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__usage_app_version.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__usage_app_version_tmp') }}

),

fields as (
Expand Down Expand Up @@ -34,4 +33,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__usage_device.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__usage_device_tmp') }}

),

fields as (
Expand Down Expand Up @@ -34,4 +33,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__usage_platform_version.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__usage_platform_version_tmp') }}

),

fields as (
Expand Down Expand Up @@ -34,4 +33,5 @@ final as (
from fields
)

select * from final
select *
from final
4 changes: 2 additions & 2 deletions models/stg_apple_store__usage_territory.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with base as (

select *
from {{ ref('stg_apple_store__usage_territory_tmp') }}

),

fields as (
Expand Down Expand Up @@ -34,4 +33,5 @@ final as (
from fields
)

select * from final
select *
from final
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__app_store_device_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('app_store_device') }}
select *
from {{ var('app_store_device') }}
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('app_store_platform_version') }}
select *
from {{ var('app_store_platform_version') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__app_store_territory_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('app_store_territory') }}
select *
from {{ var('app_store_territory') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__app_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('app') }}
select *
from {{ var('app') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__crashes_app_version_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('crashes_app_version') }}
select *
from {{ var('crashes_app_version') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__crashes_platform_version_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('crashes_platform_version') }}
select *
from {{ var('crashes_platform_version') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__downloads_device_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('downloads_device') }}
select *
from {{ var('downloads_device') }}
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('downloads_platform_version') }}
select *
from {{ var('downloads_platform_version') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__downloads_territory_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('downloads_territory') }}
select *
from {{ var('downloads_territory') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__sales_account_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('sales_account') }}
select *
from {{ var('sales_account') }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ config(enabled=var('apple_store__using_subscriptions', False)) }}

select * from {{ var('sales_subscription_events') }}
select *
from {{ var('sales_subscription_events') }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ config(enabled=var('apple_store__using_subscriptions', False)) }}

select * from {{ var('sales_subscription_summary') }}
select *
from {{ var('sales_subscription_summary') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__usage_app_version_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('usage_app_version') }}
select *
from {{ var('usage_app_version') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__usage_device_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('usage_device') }}
select *
from {{ var('usage_device') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__usage_platform_version_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('usage_platform_version') }}
select *
from {{ var('usage_platform_version') }}
3 changes: 2 additions & 1 deletion models/tmp/stg_apple_store__usage_territory_tmp.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
select * from {{ var('usage_territory') }}
select *
from {{ var('usage_territory') }}

0 comments on commit 5623e4d

Please sign in to comment.