Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 7 additions & 26 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,20 @@
**Please provide your name and company**
Resolves #
<!--- Add your issue # above. If an issue was not created, please create one so our team can review your submission. -->

**Link the issue/feature request which this PR is meant to address**
<!--- If an issue was not created, please create one first so we may discuss the PR prior to opening one. -->
### Please provide your name and company

**Detail what changes this PR introduces and how this addresses the issue/feature request linked above.**

**How did you validate the changes introduced within this PR?**
### Describe what this PR changes and how it addresses the linked issue or feature request.

**Which warehouse did you use to develop these changes?**

**Did you update the CHANGELOG?**
<!--- Please update the new package version’s CHANGELOG entry detailing the changes included in this PR. -->
<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). -->
- [ ] Yes
### How did you validate the changes introduced within this PR, and what warehouse did you use for testing?

**Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)**
<!--- The dbt_project.yml and the integration_tests/dbt_project.yml files contain the version number. Be sure to upgrade it accordingly -->
<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). -->
- [ ] Yes

**Typically there are additional maintenance changes required before this will be ready for an upcoming release. Are you comfortable with the Fivetran team making a few commits directly to your branch?**
<!--- If you select Yes this will help expedite your PR in case there are small changes required before approval. We encourage you not to use this branch in a production environment as we may make additional updates. -->
<!--- If you select No, we will not make any changes directly to your branch and will either communicate any planned changes via the PR thread or will merge your PR into a separate branch so we may make changes without modifying your branch.. -->
- [ ] Yes
- [ ] No

**If you had to summarize this PR in an emoji, which would it be?**
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
:dancer:

**Feedback**

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next.

**PR Template**
- [Community Pull Request Template](?expand=1&template=pull_request_template.md) (default)
**PR Template**

- [Community Pull Request Template](?expand=1&template=pull_request_template.md) (default)
- [Maintainer Pull Request Template](?expand=1&template=maintainer_pull_request_template.md) (to be used by maintainers)
10 changes: 10 additions & 0 deletions .github/workflows/check-docs-current.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Check docs current

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
check-docs:
uses: fivetran/dbt_package_automations/.github/workflows/check-docs-current.yml@main
secrets: inherit
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# dbt_google_play v1.3.1

[PR #36](https://github.com/fivetran/dbt_google_play/pull/36) includes the following updates:

## Feature Updates
- Adds DuckDB as a supported destination.


# dbt_google_play v1.3.0

[PR #34](https://github.com/fivetran/dbt_google_play/pull/34) includes the following updates:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ By default, this package materializes the following final tables:
To use this dbt package, you must have the following:

- At least one Fivetran Google Play connection syncing data into your destination.
- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, or **Databricks** destination.
- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, **Databricks**, or **DuckDB** destination.

## How do I use the dbt package?
You can either add this dbt package in the Fivetran dashboard or import it into your dbt project:
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: 'google_play'
version: '1.3.0'
version: '1.3.1'
config-version: 2
require-dbt-version: [">=1.3.0", "<3.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.

1 change: 1 addition & 0 deletions integration_tests/ci/test_scenarios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ schema_variable_name: "google_play_schema"

include_databricks_sql: false
include_sqlserver: false
include_duckdb: true
include_dbt_compile: true

test_scenarios:
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'google_play_integration_tests'
version: '1.3.0'
version: '1.3.1'
profile: 'integration_tests'
config-version: 2

Expand Down
3 changes: 2 additions & 1 deletion integration_tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ dbt-postgres>=1.3.0,<2.0.0
dbt-spark>=1.3.0,<2.0.0
dbt-spark[PyHive]>=1.3.0,<2.0.0
dbt-databricks>=1.3.0,<2.0.0
certifi==2025.1.31
dbt-duckdb>=1.3.0,<2.0.0
certifi==2025.1.31
2 changes: 1 addition & 1 deletion models/intermediate/int_google_play__earnings.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ with earnings as (
daily_country_metrics as (

-- let's pivot out revenue metrics associated with each type of transaction type
{% set transaction_types = dbt_utils.get_column_values(table=ref('stg_google_play__earnings'), column="transaction_type") if execute and flags.WHICH in ('run', 'build') else [] %}
{% set transaction_types = (dbt_utils.get_column_values(table=ref('stg_google_play__earnings'), column="transaction_type") or []) if execute and flags.WHICH in ('run', 'build') else [] %}

select
source_relation,
Expand Down
6 changes: 5 additions & 1 deletion models/staging/stg_google_play__earnings.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ final as (

{% elif target.type in ('spark','databricks') %}
to_date(transaction_date, 'MMM d, y') as transaction_date,
to_timestamp(to_date(transaction_date, 'MMM d, y') || ' ' || left(lpad(transaction_time, 15, '0'), 11), 'yyyy-MM-dd h:m:s a')
to_timestamp(to_date(transaction_date, 'MMM d, y') || ' ' || left(lpad(transaction_time, 15, '0'), 11), 'yyyy-MM-dd h:m:s a')

{% elif target.type == 'duckdb' %}
strptime(transaction_date, '%b %-d, %Y')::date as transaction_date,
strptime(strptime(transaction_date, '%b %-d, %Y')::date::varchar || ' ' || left(lpad(transaction_time, 15, '0'), 11), '%Y-%m-%d %I:%M:%S %p')::timestamp

{% else %}
cast(transaction_date as date) as transaction_date,
Expand Down
Loading