Skip to content

Commit

Permalink
Merge pull request #5 from fivetran/review/jm-final
Browse files Browse the repository at this point in the history
initial review notes and edits
  • Loading branch information
fivetran-sheringuyen authored Jun 1, 2022
2 parents cb19741 + 396bb3e commit 53b26dc
Show file tree
Hide file tree
Showing 29 changed files with 79 additions and 60 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
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ The following table provides a detailed list of all models materialized within t
| **model** | **description** |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [apple_store__app_version_report](https://github.com/fivetran/dbt_apple_store/blob/main/models/apple_store__app_version_report.sql) | Each record represents daily metrics for each by app_id, source_type and app version. |
| [apple_store__device_report](https://github.com/fivetran/dbt_apple_store/blob/main/models/apple_store__device_report.sql) | Each record represents daily subscription metrics by app_id, source_type and device. |
| [apple_store__overview_report](https://github.com/fivetran/dbt_apple_store/blob/main/models/apple_store__overview_report.sql) | Each record represents daily metrics for each app_id. |
| [apple_store__platform_version_report](https://github.com/fivetran/dbt_apple_store/blob/main/models/apple_store__platform_version_report.sql) | Each record represents daily metrics for each by app_id, source_type and platform version. |
| [apple_store__source_type_report](https://github.com/fivetran/dbt_apple_store/blob/main/models/apple_store__source_type_report.sql) | Each record represents daily metrics by app_id and source_type. |
| [apple_store__subscription_report](https://github.com/fivetran/dbt_apple_store/blob/main/models/apple_store__subscription_report.sql) | Each record represents daily subscription metrics by account, app, subscription name, country and state. |
| [apple_store__territory_report](https://github.com/fivetran/dbt_apple_store/blob/main/models/apple_store__territory_report.sql) | Each record represents daily subscription metrics by app_id, source_type and territory. |
| [apple_store__app_version_report](https://fivetran.github.io/dbt_apple_store/#!/model/model.apple_store.apple_store__app_version_report) | Each record represents daily metrics for each by app_id, source_type and app version. |
| [apple_store__device_report](https://fivetran.github.io/dbt_apple_store/#!/model/model.apple_store.apple_store__device_report) | Each record represents daily subscription metrics by app_id, source_type and device. |
| [apple_store__overview_report](https://fivetran.github.io/dbt_apple_store/#!/model/model.apple_store.apple_store__overview_report) | Each record represents daily metrics for each app_id. |
| [apple_store__platform_version_report](https://fivetran.github.io/dbt_apple_store/#!/model/model.apple_store.apple_store__platform_version_report) | Each record represents daily metrics for each by app_id, source_type and platform version. |
| [apple_store__source_type_report](https://fivetran.github.io/dbt_apple_store/#!/model/model.apple_store.apple_store__source_type_report) | Each record represents daily metrics by app_id and source_type. |
| [apple_store__subscription_report](https://fivetran.github.io/dbt_apple_store/#!/model/model.apple_store.apple_store__subscription_report) | Each record represents daily subscription metrics by account, app, subscription name, country and state. |
| [apple_store__territory_report](https://fivetran.github.io/dbt_apple_store/#!/model/model.apple_store.apple_store__source_type_report) | Each record represents daily subscription metrics by app_id, source_type and territory. |

# 🎯 How do I use the dbt package?

Expand Down Expand Up @@ -101,7 +101,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 Expand Up @@ -136,6 +136,9 @@ A small team of analytics engineers at Fivetran develops these dbt packages. How

We highly encourage and welcome contributions to this package. Check out [this dbt Discourse article](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657) on the best workflow for contributing to a package!

## Opinionated Decisions
In creating this package, which is meant for a wide range of use cases, we had to take opinionated stances on a few different questions we came across during development. We've consolidated significant choices we made in the [DECISIONLOG.md](https://github.com/fivetran/dbt_apple_store/blob/main/DECISIONLOG.md), and will continue to update as the package evolves. We are always open to and encourage feedback on these choices, and the package in general.

# 🏪 Are there any resources available?
- If you have questions or want to reach out for help, please refer to the [GitHub Issue](https://github.com/fivetran/dbt_apple_store/issues/new/choose) section to find the right avenue of support for you.
- If you would like to provide feedback to the dbt package team at Fivetran or would like to request a new dbt package, fill out our [Feedback Form](https://www.surveymonkey.com/r/DQ7K7WW).
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_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"

apple_store__subscription_events:
- 'Renew'
Expand Down
3 changes: 2 additions & 1 deletion models/apple_store__app_version_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ joined as (
and reporting_grain.app_version = usage_app_version_report.app_version
)

select * from joined
select *
from joined
3 changes: 2 additions & 1 deletion models/apple_store__device_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@ joined as (
and reporting_grain.device = usage_device.device
)

select * from joined
select *
from joined
3 changes: 2 additions & 1 deletion models/apple_store__overview_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,5 @@ joined as (
and reporting_grain.app_id = usage.app_id
)

select * from joined
select *
from joined
3 changes: 2 additions & 1 deletion models/apple_store__platform_version_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,5 @@ joined as (
and reporting_grain.platform_version = usage_platform_version.platform_version
)

select * from joined
select *
from joined
3 changes: 2 additions & 1 deletion models/apple_store__source_type_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ joined as (
and reporting_grain.source_type = usage_source_type.source_type
)

select * from joined
select *
from joined
3 changes: 2 additions & 1 deletion models/apple_store__subscription_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ joined as (

)

select * from joined
select *
from joined
3 changes: 2 additions & 1 deletion models/apple_store__territory_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@ joined as (
on reporting_grain.territory = alternative_country_codes.alternative_country_name
)

select * from joined
select *
from joined
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ aggregated as (
{{ dbt_utils.group_by(4) }}
)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ aggregated as (
{{ dbt_utils.group_by(4) }}
)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ joined as (
and subscription_summary.device = pivoted_subscription_events.device
left join app
on subscription_summary.app_name = app.app_name

)

select * from joined
select *
from joined
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ aggregated as (
sum(page_views) as page_views
from base
{{ dbt_utils.group_by(2) }}

)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ aggregated as (
{{ dbt_utils.group_by(2) }}
)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ aggregated as (
{{ dbt_utils.group_by(2) }}
)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ joined as (
and subscription_summary.app_id = subscription_events.app_id
)

select * from joined
select *
from joined
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ aggregated as (
{{ dbt_utils.group_by(2) }}
)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ aggregated as (
{{ dbt_utils.group_by(4) }}
)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ aggregated as (
sum(page_views) as page_views
from base
{{ dbt_utils.group_by(3) }}

)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ aggregated as (
{{ dbt_utils.group_by(3) }}
)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ aggregated as (
{{ dbt_utils.group_by(3) }}
)

select * from aggregated
select *
from aggregated
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ joined as (
on pivoted.account_id = sales_account.account_id
)

select * from joined
select *
from joined
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ joined as (
{{ dbt_utils.group_by(8) }}
)

select * from joined
select *
from joined
6 changes: 2 additions & 4 deletions packages.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
packages:
## edit before release
- git: https://github.com/fivetran/dbt_apple_store_source.git
revision: main
warn-unpinned: false
- package: fivetran/apple_store_source
version: [">=0.1.0", "<0.2.0"]

0 comments on commit 53b26dc

Please sign in to comment.