Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Ads API Update #27

Merged
merged 8 commits into from
Oct 5, 2021
Merged

Conversation

fivetran-joemarkiewicz
Copy link
Contributor

Are you a current Fivetran customer?

Fivetran created PR

What change(s) does this PR introduce?

This PR introduces the functionality of the ad reporting package to leverage the Google Ads API version of the connector if the customer has configured it as such.

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
  • No (please provide explanation how the change is non breaking below.)

As this change integrates the Google Ads breaking change we will want to list this as a breaking change as well.

Is this PR in response to a previously created Issue

  • Yes, Issue [link issue number here]
  • No

How did you test the PR changes?

  • CircleCi
  • Other (please provide additional testing details below)

Select which warehouse(s) were used to test the PR

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Provide an emoji that best describes your current mood

📟

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 on our existing dbt packages or what you'd like to see next.

@@ -11,7 +11,7 @@ with base as (
'Google Ads' as platform,
cast(date_day as date) as date_day,
account_name,
cast(external_customer_id as {{ dbt_utils.type_string() }}) as account_id,
{% if var('api_source','adwords') == 'google_ads' %} account_id {% else %} external_customer_id as account_id {% endif %} ,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too familiar with variables, are they always lowercased? There's not going to be a chance of it being GOOGLE_ADS or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call out @fivetran-reneeli! The variable is set by the user so they very well could in fact set the result to GOOGLE_ADS. However, we explicitly tell them that they should use google_ads in the README so I believe it is safe to strictly look just for the lowercase variable result.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are using a variable however where we do not explicitly tell the user what to input (if they want to add passthrough columns) it is always a good idea to standardize the results so it can be caught if the users changes the casing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ yah could be to add a | lower filter when comparing the variable value to google_ads

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or alternatively point out that it's case sensitive more

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree we should have added a | lower filter. However, this filter is not present in the other references of this variable within google_ads (which has already been released) for consistency I will just make a point to call out that this is case sensitive for now.

Thanks team!!

Copy link
Contributor

@fivetran-reneeli fivetran-reneeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just had a question for stg_google_ads

Copy link
Contributor

@fivetran-jamie fivetran-jamie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good -- i do think we should either lowercase the api variable or make it clearer that it's case sensitive tho

README.md Outdated
@@ -104,7 +104,18 @@ models:
snapchat_ads_source:
enabled: false
```
### Google Ads API Configuration
If your connector is setup using the Google Ads API then you will need to configure your `dbt_project.yml` with the below variable:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will users know what we're talking about here? like should we explain what this difference is at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good call, let me lift our wording from Google Ads and paste here to be more descriptive.

@@ -11,7 +11,7 @@ with base as (
'Google Ads' as platform,
cast(date_day as date) as date_day,
account_name,
cast(external_customer_id as {{ dbt_utils.type_string() }}) as account_id,
{% if var('api_source','adwords') == 'google_ads' %} account_id {% else %} external_customer_id as account_id {% endif %} ,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ yah could be to add a | lower filter when comparing the variable value to google_ads

@@ -11,7 +11,7 @@ with base as (
'Google Ads' as platform,
cast(date_day as date) as date_day,
account_name,
cast(external_customer_id as {{ dbt_utils.type_string() }}) as account_id,
{% if var('api_source','adwords') == 'google_ads' %} account_id {% else %} external_customer_id as account_id {% endif %} ,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or alternatively point out that it's case sensitive more

@fivetran-joemarkiewicz fivetran-joemarkiewicz merged commit 1bb7ed1 into master Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants