Add geo reports#44
Conversation
…ource into feature-update/add-geo-reports
fivetran-joemarkiewicz
left a comment
There was a problem hiding this comment.
LGTM with just a few small suggestions
| _fivetran_id as country_id, | ||
| country, | ||
| date as date_day, | ||
| cast(account_id as {{ dbt.type_bigint() }}) as account_id, |
There was a problem hiding this comment.
No necessary to change for this PR since I know this decision was made in other models and we need to conform with the approach. However, it's interesting we make the decision to cast these IDs as integers. Usually we cast as string to be safe.
There was a problem hiding this comment.
Yeah I thought so too
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
| description: Currency associated with account. | ||
| - name: timezone_name | ||
| description: Timezone associated with account. | ||
| - name: business_country_code |
There was a problem hiding this comment.
This is a duplicate of lines 31-32, you can remove this.
| - name: inline_link_click_ctr | ||
| description: '{{ doc("inline_link_click_ctr") }}' |
There was a problem hiding this comment.
Don't see this field in the macro either.
| - name: cost_per_inline_link_click | ||
| description: '{{ doc("cost_per_inline_link_click") }}' | ||
| - name: cpc | ||
| description: '{{ doc("cpc") }}' | ||
| - name: cpm | ||
| description: '{{ doc("cpm") }}' | ||
| - name: ctr | ||
| description: '{{ doc("ctr") }}' |
There was a problem hiding this comment.
I don't see these fields in the macro, should these be removed?
There was a problem hiding this comment.
They're not, but I thought it was easy enough to document them for users in case they want to pass them in. I prefer to leave them in unless you have a strong opinion otherwise
| **9 total changes • 0 possible breaking changes** | ||
| | **Data Model** | **Change type** | **Old name** | **New name** | **Notes** | | ||
| | ---------------- | --------------- | ------------ | ------------ | --------- | | ||
| | stg_facebook_ads__demographics_country | New Model | | | Uses `demographics_country` source table | |
There was a problem hiding this comment.
Request to add links to the DAG for all Data Model column entries.
|
|
||
| To connect your multiple schema/database sources to the package models, follow the steps outlined in the [Union Data Defined Sources Configuration](https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source) section of the Fivetran Utils documentation for the union_data macro. This will ensure a proper configuration and correct visualization of connections in the DAG. | ||
|
|
||
| #### Eanble or Disable Country and Region Reports |
There was a problem hiding this comment.
| #### Eanble or Disable Country and Region Reports | |
| #### Enable or Disable Country and Region Reports |
There was a problem hiding this comment.
Adjusting myself directly
| - name: inline | ||
| description: '{{ doc("inline") }}' | ||
| - name: _7_d_click | ||
| description: '{{ doc("_7_d_click") }}' | ||
| - name: _1_d_view | ||
| description: '{{ doc("_1_d_view") }}' |
There was a problem hiding this comment.
Don't see these fields in the macro, should they be removed?
| - name: cost_per_inline_link_click | ||
| description: '{{ doc("cost_per_inline_link_click") }}' | ||
| - name: cpc | ||
| description: '{{ doc("cpc") }}' | ||
| - name: cpm | ||
| description: '{{ doc("cpm") }}' | ||
| - name: ctr | ||
| description: '{{ doc("ctr") }}' |
There was a problem hiding this comment.
Don't see these fields in the macro, should they be removed?
| description: '{{ doc("frequency") }}' | ||
| - name: spend | ||
| description: '{{ doc("spend") }}' | ||
| - name: inline_link_click_ctr |
There was a problem hiding this comment.
Don't see this field either.
| description: '{{ doc("conversions") }}' | ||
| - name: _fivetran_synced | ||
| description: '{{ doc("_fivetran_synced") }}' | ||
| - name: inline |
There was a problem hiding this comment.
Don't see this field in the corresponding macro.
|
|
||
| ## Feature Updates: | ||
| - Added the `facebook_ads__using_demographics_country` and `facebook_ads__using_demographics_region` variables, which can be used to enable or disable the above transformations related to the `demographics_country`/`demograhics_country_actions` and `demographics_region`/`demographics_region_actions` tables. | ||
| - These variables are dynamically set for Fivetran Quickstart users, but **false** by default otherwise. See [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#enable-or-disable-country-and-region-reports) for more details. |
There was a problem hiding this comment.
| - These variables are dynamically set for Fivetran Quickstart users, but **false** by default otherwise. See [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#enable-or-disable-country-and-region-reports) for more details. | |
| - These variables are dynamically set for Fivetran Quickstart users, but **false** by default otherwise. See [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#enable-or-disable-country-and-region-reports) for more details on how to enable these models, particularly if you are using dbt Core. |
There was a problem hiding this comment.
Adjusting myself directly
fivetran-avinash
left a comment
There was a problem hiding this comment.
@fivetran-jamie Thanks for applying the updates, lgtm!
PR Overview
Package version introduced in this PR:
v0.9.0
This PR addresses the following Issue/Feature(s):
GA-926126
Summary of changes:
Adds source tables necessary to create country and region reports downstream
Submission Checklist
see transform PR for more details, but confirming that the enable/disable variables work:

False produces 16 models
and 20 tests

True produces 24 models

and 24 tests

Changelog