Skip to content

Commit

Permalink
Merge pull request #62 from fivetran/MagicBot/package-extract-url-par…
Browse files Browse the repository at this point in the history
…ameters

Extract URL Parameter Macro Update
  • Loading branch information
fivetran-joemarkiewicz authored Dec 14, 2023
2 parents fe04117 + 1b04649 commit 7cabf7d
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 13 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'auto release'
on:
pull_request:
types:
- closed
branches:
- main

jobs:
call-workflow-passing-data:
if: github.event.pull_request.merged
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
secrets: inherit
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

package-lock.yml
target/
dbt_modules/
logs/

env/
dbt_packages/
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# dbt_google_ads v0.10.1
[PR #62](https://github.com/fivetran/dbt_google_ads/pull/62) includes the following updates:

## Bug Fixes
- This package now leverages the new `google_ads_extract_url_parameter()` (located within the dbt_google_ads_source package) macro for use in parsing out url parameters. This was added to create special logic for Databricks instances not supported by `dbt_utils.get_url_parameter()`.
- This macro will be replaced with the `fivetran_utils.extract_url_parameter()` macro in the next breaking change of this package.

## Under the Hood
- Included auto-releaser GitHub Actions workflow to automate future releases.

# dbt_google_ads v0.10.0
[PR #52](https://github.com/fivetran/dbt_google_ads/pull/52) includes the following updates:
## Feature update 🎉
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.10.0'
version: '0.10.1'

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.

4 changes: 2 additions & 2 deletions 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.

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_ads_integration_tests'
version: '0.10.0'
version: '0.10.1'

profile: 'integration_tests'
config-version: 2
Expand Down
8 changes: 4 additions & 4 deletions models/google_ads__url_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ fields as (

{% if var('google_auto_tagging_enabled', false) %}

coalesce( {{ dbt_utils.get_url_parameter('ads.final_url', 'utm_source') }} , 'google') as utm_source,
coalesce( {{ dbt_utils.get_url_parameter('ads.final_url', 'utm_medium') }} , 'cpc') as utm_medium,
coalesce( {{ dbt_utils.get_url_parameter('ads.final_url', 'utm_campaign') }} , campaigns.campaign_name) as utm_campaign,
coalesce( {{ dbt_utils.get_url_parameter('ads.final_url', 'utm_content') }} , ad_groups.ad_group_name) as utm_content,
coalesce( {{ google_ads_source.google_ads_extract_url_parameter('ads.final_url', 'utm_source') }} , 'google') as utm_source,
coalesce( {{ google_ads_source.google_ads_extract_url_parameter('ads.final_url', 'utm_medium') }} , 'cpc') as utm_medium,
coalesce( {{ google_ads_source.google_ads_extract_url_parameter('ads.final_url', 'utm_campaign') }} , campaigns.campaign_name) as utm_campaign,
coalesce( {{ google_ads_source.google_ads_extract_url_parameter('ads.final_url', 'utm_content') }} , ad_groups.ad_group_name) as utm_content,

{% else %}

Expand Down

0 comments on commit 7cabf7d

Please sign in to comment.