Skip to content

Commit

Permalink
Merge pull request #49 from fivetran/add_currency_field
Browse files Browse the repository at this point in the history
add currency field
  • Loading branch information
fivetran-reneeli authored Jun 12, 2023
2 parents 6b3b0f1 + 0520cc5 commit 9ac3079
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 21 deletions.
20 changes: 16 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# dbt_google_ads v0.UPDATE.UPDATE
# dbt_google_ads v0.9.2

## Under the Hood:
## 🎉 Features 🎉
- Added the column `currency_code` to the following models ([PR #49](https://github.com/fivetran/dbt_google_ads/pull/49)):
- `google_ads__ad_group_report`
- `google_ads__ad_report`
- `google_ads__campaign_report`
- `google_ads__keyword_report`
- `google_ads__url_report`

## Under the Hood:

- Incorporated the new `fivetran_utils.drop_schemas_automation` macro into the end of each Buildkite integration test job. ([PR #46](https://github.com/fivetran/dbt_google_ads/pull/46))
- Updated the pull request [templates](/.github). ([PR #46](https://github.com/fivetran/dbt_google_ads/pull/46))

## Contributors
- [@asmundu](https://github.com/asmundu) ([PR #36](https://github.com/fivetran/dbt_google_ads/pull/36))

- 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_google_ads v0.9.1
## Bug fixes
- Adjusted keyword report to leverage the stats ids as opposed to the history ids to have more accurate reporting. ([PR #41](https://github.com/fivetran/dbt_google_ads/pull/41))
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_ads'
version: '0.9.1'
version: '0.9.2'

config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
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/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 @@ -15,13 +15,13 @@ integration_tests:
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: google_ads_integration_tests_30
schema: google_ads_integration_tests_31
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: google_ads_integration_tests_30
schema: google_ads_integration_tests_31
threads: 8
keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}"
snowflake:
Expand All @@ -32,7 +32,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: google_ads_integration_tests_30
schema: google_ads_integration_tests_31
threads: 8
postgres:
type: postgres
Expand All @@ -41,13 +41,13 @@ integration_tests:
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: google_ads_integration_tests_30
schema: google_ads_integration_tests_31
threads: 8
databricks:
catalog: null
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
schema: google_ads_integration_tests_30
schema: google_ads_integration_tests_31
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,11 +1,11 @@
name: 'google_ads_integration_tests'
version: '0.9.1'
version: '0.9.2'

profile: 'integration_tests'
config-version: 2

vars:
google_ads_schema: google_ads_integration_tests_30
google_ads_schema: google_ads_integration_tests_31
google_ads_ad_stats_identifier: "ad_stats_data"
google_ads_ad_history_identifier: "ad_history_data"
google_ads_ad_group_history_identifier: "ad_group_history_data"
Expand Down
10 changes: 10 additions & 0 deletions models/google_ads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ models:
description: "{{ doc('account_descriptive_name') }}"
- name: account_id
description: "{{ doc('external_customer_id') }}"
- name: currency_code
description: The currency which the account uses.
- name: campaign_name
description: "{{ doc('campaign_name') }}"
- name: campaign_id
Expand Down Expand Up @@ -100,6 +102,8 @@ models:
description: "{{ doc('account_descriptive_name') }}"
- name: account_id
description: "{{ doc('external_customer_id') }}"
- name: currency_code
description: The currency which the account uses.
- name: campaign_name
description: "{{ doc('campaign_name') }}"
- name: campaign_id
Expand Down Expand Up @@ -136,6 +140,8 @@ models:
description: "{{ doc('account_descriptive_name') }}"
- name: account_id
description: "{{ doc('external_customer_id') }}"
- name: currency_code
description: The currency which the account uses.
- name: campaign_name
description: "{{ doc('campaign_name') }}"
- name: campaign_id
Expand Down Expand Up @@ -179,6 +185,8 @@ models:
description: "{{ doc('account_descriptive_name') }}"
- name: account_id
description: "{{ doc('external_customer_id') }}"
- name: currency_code
description: The currency which the account uses.
- name: campaign_name
description: "{{ doc('campaign_name') }}"
- name: campaign_id
Expand Down Expand Up @@ -213,6 +221,8 @@ models:
description: "{{ doc('account_descriptive_name') }}"
- name: account_id
description: "{{ doc('external_customer_id') }}"
- name: currency_code
description: The currency which the account uses.
- name: campaign_name
description: "{{ doc('campaign_name') }}"
- name: campaign_id
Expand Down
3 changes: 2 additions & 1 deletion models/google_ads__ad_group_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fields as (
stats.date_day,
accounts.account_name,
accounts.account_id,
accounts.currency_code,
campaigns.campaign_name,
campaigns.campaign_id,
ad_groups.ad_group_name,
Expand All @@ -52,7 +53,7 @@ fields as (
on ad_groups.campaign_id = campaigns.campaign_id
left join accounts
on campaigns.account_id = accounts.account_id
{{ dbt_utils.group_by(9) }}
{{ dbt_utils.group_by(10) }}
)

select *
Expand Down
3 changes: 2 additions & 1 deletion models/google_ads__ad_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fields as (
stats.date_day,
accounts.account_name,
accounts.account_id,
accounts.currency_code,
campaigns.campaign_name,
campaigns.campaign_id,
ad_groups.ad_group_name,
Expand All @@ -66,7 +67,7 @@ fields as (
on ad_groups.campaign_id = campaigns.campaign_id
left join accounts
on campaigns.account_id = accounts.account_id
{{ dbt_utils.group_by(13) }}
{{ dbt_utils.group_by(14) }}
)

select *
Expand Down
3 changes: 2 additions & 1 deletion models/google_ads__campaign_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fields as (
stats.date_day,
accounts.account_name,
accounts.account_id,
accounts.currency_code,
campaigns.campaign_name,
campaigns.campaign_id,
campaigns.advertising_channel_type,
Expand All @@ -42,7 +43,7 @@ fields as (
on stats.campaign_id = campaigns.campaign_id
left join accounts
on campaigns.account_id = accounts.account_id
{{ dbt_utils.group_by(8) }}
{{ dbt_utils.group_by(9) }}
)

select *
Expand Down
3 changes: 2 additions & 1 deletion models/google_ads__keyword_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fields as (
stats.date_day,
accounts.account_name,
stats.account_id,
accounts.currency_code,
campaigns.campaign_name,
stats.campaign_id,
ad_groups.ad_group_name,
Expand All @@ -64,7 +65,7 @@ fields as (
on stats.campaign_id = campaigns.campaign_id
left join accounts
on stats.account_id = accounts.account_id
{{ dbt_utils.group_by(12) }}
{{ dbt_utils.group_by(13) }}
)

select *
Expand Down
3 changes: 2 additions & 1 deletion models/google_ads__url_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fields as (
stats.date_day,
accounts.account_name,
accounts.account_id,
accounts.currency_code,
campaigns.campaign_name,
campaigns.campaign_id,
ad_groups.ad_group_name,
Expand Down Expand Up @@ -87,7 +88,7 @@ fields as (
where ads.source_final_urls is not null
{% endif %}

{{ dbt_utils.group_by(16) }}
{{ dbt_utils.group_by(17) }}
)

select *
Expand Down

0 comments on commit 9ac3079

Please sign in to comment.