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

Feature/pinterest v5 api support #25

Merged
merged 28 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c6ae72f
rm deprecated fields from advertiser history
fivetran-reneeli Jul 5, 2023
7af68d9
replace advertiser id with ad account id
fivetran-reneeli Jul 5, 2023
dd88962
rename ad account id back to advertiser in staging
fivetran-reneeli Jul 5, 2023
65eba01
ad group history new fields
fivetran-reneeli Jul 5, 2023
9dd751a
campaign history new fields and add new fields in macros
fivetran-reneeli Jul 5, 2023
ae08485
add advertiser/ ad account id new field to pin promotion history
fivetran-reneeli Jul 5, 2023
50358f6
changelog
fivetran-reneeli Jul 5, 2023
8825845
changelog complete
fivetran-reneeli Jul 5, 2023
d1b4c41
changelog
fivetran-reneeli Jul 5, 2023
c17c29a
formatting
fivetran-reneeli Jul 5, 2023
b32fee6
add advertiser id to docs
fivetran-reneeli Jul 5, 2023
b6d1db2
docs
fivetran-reneeli Jul 5, 2023
7e83d1b
rename permissions in macro bc reserved word in redshift
fivetran-reneeli Jul 6, 2023
b2f40ac
add seed
fivetran-reneeli Jul 11, 2023
06228c3
formatting
fivetran-reneeli Jul 11, 2023
4f07cd0
docs
fivetran-reneeli Jul 11, 2023
44dbb5c
try 2
fivetran-reneeli Jul 11, 2023
e7f886d
add ad account id to ad group history
fivetran-reneeli Jul 12, 2023
1686600
swap ad account id to advertiser id
fivetran-reneeli Jul 13, 2023
0e9f3c9
int test data type
fivetran-reneeli Jul 13, 2023
5129e41
updates
fivetran-reneeli Jul 14, 2023
407197b
update ymls
fivetran-reneeli Jul 14, 2023
6b9b3d6
docs
fivetran-reneeli Jul 14, 2023
493e8c3
update docs and rename seeds
fivetran-reneeli Jul 14, 2023
303b396
wording
fivetran-reneeli Jul 14, 2023
4ba22b0
update changelog
fivetran-reneeli Jul 19, 2023
5b4f6cd
changelog
fivetran-reneeli Jul 25, 2023
966abe0
up version and update readme
fivetran-reneeli Jul 26, 2023
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
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# dbt_pinterest_source v0.9.0
# Pinterest Ads v5 Upgrade
## 🚨 Breaking Changes 🚨:
[PR #25](https://github.com/fivetran/dbt_pinterest_source/pull/25) introduces the following changes:
- Following Pinterest Ads deprecating the v4 API on June 30, 2023 in place of v5, the Pinterest Ads Fivetran connector now leverages the Pinterest v5 API. The following fields have been deprecated/introduced:

| **Model** | **Removed** | **New** |
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
|---|---|---|
| [stg_pinterest_ads__advertiser_history](https://fivetran.github.io/dbt_pinterest_source/#!/model/model.pinterest_source.stg_pinterest_ads__advertiser_history) | `billing_profile_status`, `billing_type`, `merchant_id`, `status` | `owner_username`, `permissions` |
| [stg_pinterest_ads__campaign_history](https://fivetran.github.io/dbt_pinterest_source/#!/model/model.pinterest_source.stg_pinterest_ads__campaign_history) | | `default_ad_group_budget_in_micro_currency`, `is_automated_campaign`, `is_campaign_budget_optimization`, `is_flexible_daily_budgets` |
| [stg_pinterest_ads__ad_group_history](https://fivetran.github.io/dbt_pinterest_source/#!/model/model.pinterest_source.stg_pinterest_ads__ad_group_history) | | `pacing_delivery_type`, `placement_group`, `summary_status`, `advertiser_id` |
| [stg_pinterest_ads__pin_promotion_history](https://fivetran.github.io/dbt_pinterest_source/#!/model/model.pinterest_source.stg_pinterest_ads__pin_promotion_history) | | `advertiser_id` |


## Under the Hood:
- Following the v5 upgrade, `ad_account_id` is a net new field within `ad_group_history` and `pin_promotion_history` source tables synced via the connector. However, to keep these fields standard across the package, we have renamed them as `advertiser_id` within the respective staging models.
- Seed data were updated with new/removed fields following the v5 upgrade
# dbt_pinterest_source v0.8.0
- This was an accidental release

# dbt_pinterest_source v0.7.2
## Features
- Addition of the `pinterest__using_keywords` (default=`true`) variable that allows users to disable the relevant keyword reports in the downstream Pinterest models if they are not used. ([PR #23](https://github.com/fivetran/dbt_pinterest_source/pull/23))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you are **not** using the [Pinterest transformation package](https://github.
```yaml
packages:
- package: fivetran/pinterest_source
version: [">=0.7.0", "<0.8.0"] # we recommend using ranges to capture non-breaking changes automatically
version: [">=0.9.0", "<0.10.0"] # we recommend using ranges to capture non-breaking changes automatically
```
## Step 3: Define database and schema variables
By default, this package runs using your destination and the `pinterest` schema. If this is not where your Pinterest Ads data is (for example, if your pinterest schema is named `pinterest_fivetran`), add the following configuration to your root `dbt_project.yml` file:
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: 'pinterest_source'
version: '0.7.2'
version: '0.9.0'
config-version: 2
require-dbt-version: [">=1.3.0", "<2.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.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: 'pinterest_source_integration_tests'
version: '0.7.2'
version: '0.9.0'
profile: 'integration_tests'
config-version: 2

vars:
pinterest_schema: pinterest_source_integration_tests
pinterest_ad_group_history_identifier: "ad_group_history_data"
pinterest_campaign_history_identifier: "campaign_history_data"
pinterest_pin_promotion_history_identifier: "pin_promotion_history_data"
pinterest_pin_promotion_report_identifier: "pin_promotion_report_data"
pinterest_keyword_history_identifier: "keyword_history_data"
pinterest_keyword_report_identifier: "keyword_report_data"
pinterest_ad_group_report_identifier: "ad_group_report_data"
pinterest_campaign_report_identifier: "campaign_report_data"
pinterest_advertiser_history_identifier: "advertiser_history_data"
pinterest_advertiser_report_identifier: "advertiser_report_data"
pinterest_ad_group_history_identifier: "pinterest_ad_group_history_data"
pinterest_campaign_history_identifier: "pinterest_campaign_history_data"
pinterest_pin_promotion_history_identifier: "pinterest_pin_promotion_history_data"
pinterest_pin_promotion_report_identifier: "pinterest_pin_promotion_report_data"
pinterest_keyword_history_identifier: "pinterest_keyword_history_data"
pinterest_keyword_report_identifier: "pinterest_keyword_report_data"
pinterest_ad_group_report_identifier: "pinterest_ad_group_report_data"
pinterest_campaign_report_identifier: "pinterest_campaign_report_data"
pinterest_advertiser_history_identifier: "pinterest_advertiser_history_data"
pinterest_advertiser_report_identifier: "pinterest_advertiser_report_data"

seeds:
+quote_columns: "{{ true if target.type in ('redshift','postgres') else false }}"
Expand All @@ -26,6 +26,7 @@ seeds:
pin_id: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
campaign_id: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
advertiser_id: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
ad_account_id: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
pin_promotion_id: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
keyword_id: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"

Expand Down
2 changes: 0 additions & 2 deletions integration_tests/seeds/campaign_history_data.csv

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id,campaign_id,created_time,name,status,start_time,end_time,_fivetran_synced
2680065434898,626741793779,2020-03-26 09:38:46.000 +0000,9f8de0662581357b8af505197ad8145d,ACTIVE,2020-03-26 09:37:00.000 +0000,,2020-07-30 12:14:01.984 +0000
2680065434868,626741793779,2020-03-26 09:36:43.000 +0000,22a5457e096095c4e295a3c921db864c,ACTIVE,2020-03-26 09:36:00.000 +0000,,2020-07-30 12:14:01.246 +0000
2680065434863,626741793779,2020-03-26 09:35:49.000 +0000,5c7cdb607c2e540062914e276045d4d5,ACTIVE,2020-03-26 09:34:00.000 +0000,,2020-07-30 12:14:00.867 +0000
2680065434881,626741793779,2020-03-26 09:37:17.000 +0000,304b2dc4ed50ff5b6d714b810d8b50cf,ACTIVE,2020-03-26 09:36:00.000 +0000,,2020-07-30 12:14:01.598 +0000
id,campaign_id,created_time,name,status,start_time,end_time,_fivetran_synced,pacing_delivery_type,placement_group,summary_status,ad_account_id
2680065434898,626741793779,2020-03-26 09:38:46.000 +0000,9f8de0662581357b8af505197ad8145d,ACTIVE,2020-03-26 09:37:00.000 +0000,,2020-07-30 12:14:01.984 +0000,STANDARD,ALL,RUNNING,151515151
2680065434868,626741793779,2020-03-26 09:36:43.000 +0000,22a5457e096095c4e295a3c921db864c,ACTIVE,2020-03-26 09:36:00.000 +0000,,2020-07-30 12:14:01.246 +0000,STANDARD,SEARCH,RUNNING,151515151
2680065434863,626741793779,2020-03-26 09:35:49.000 +0000,5c7cdb607c2e540062914e276045d4d5,ACTIVE,2020-03-26 09:34:00.000 +0000,,2020-07-30 12:14:00.867 +0000,STANDARD,BROWSE,RUNNING,151515151
2680065434881,626741793779,2020-03-26 09:37:17.000 +0000,304b2dc4ed50ff5b6d714b810d8b50cf,ACTIVE,2020-03-26 09:36:00.000 +0000,,2020-07-30 12:14:01.598 +0000,STANDARD,OTHER,RUNNING,151515151
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
id,updated_time,_fivetran_synced,billing_profile_status,billing_type,country,created_time,currency,merchant_id,name,owner_user_id,status
549764253315,2022-06-07 14:43:17,2022-06-30 14:01:04,VALID,CASH_MONEY,US,2022-06-07 14:17:13,USD,,That Kitty Cat Company,1111111,ACTIVE
id,updated_time,_fivetran_synced,billing_profile_status,billing_type,country,created_time,currency,merchant_id,name,owner_user_id,status,owner_username,permissions
549764253315,2022-06-07 14:43:17,2022-06-30 14:01:04,VALID,CASH_MONEY,US,2022-06-07 14:17:13,USD,,That Kitty Cat Company,1111111,ACTIVE,username,string
2 changes: 2 additions & 0 deletions integration_tests/seeds/pinterest_campaign_history_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,created_time,name,status,_fivetran_synced,advertiser_id,default_ad_group_budget_in_micro_currency,is_automated_campaign,is_campaign_budget_optimization,is_flexible_daily_budgets
626741793779,2020-03-26 08:59:57.000 +0000,19e757f946601de26307d8182635b716,ACTIVE,2020-07-30 12:14:00.362 +0000,151515151,134,True,True,True
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
id,ad_group_id,created_time,destination_url,name,pin_id,status,creative_type,_fivetran_synced
687205395400,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-05-28 06:14:04.150 +0000
687205395399,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-06-15 18:14:18.130 +0000
687205395403,2680065434881,2020-03-26 09:37:17.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-01 12:14:37.616 +0000
687205395388,2680065434863,2020-03-26 09:35:49.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-23 12:14:01.610 +0000
687205395434,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-24 00:14:18.647 +0000
687205395434,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-30 12:14:03.098 +0000
687205395388,2680065434863,2020-03-26 09:35:49.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-30 12:14:03.093 +0000
687205395403,2680065434881,2020-03-26 09:37:17.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-30 12:14:03.096 +0000
687205395399,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-07-30 12:14:03.094 +0000
687205395400,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-30 12:14:03.095 +0000
687205395387,2680065434863,2020-03-26 09:35:49.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-07-30 12:14:03.093 +0000
687205395402,2680065434881,2020-03-26 09:37:17.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-07-30 12:14:03.096 +0000
687205395389,2680065434863,2020-03-26 09:35:49.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216199,ACTIVE,VIDEO,2020-07-30 12:14:03.094 +0000
687205395433,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-07-30 12:14:03.097 +0000
687205395404,2680065434881,2020-03-26 09:37:17.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216199,ACTIVE,VIDEO,2020-07-30 12:14:03.097 +0000
687205395401,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216199,ACTIVE,VIDEO,2020-07-30 12:14:03.095 +0000
687205395435,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216199,ACTIVE,VIDEO,2020-07-30 12:14:03.098 +0000
687205395434,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-06-23 18:14:30.000 +0000
id,ad_group_id,created_time,destination_url,name,pin_id,status,creative_type,_fivetran_synced,ad_account_id
687205395434,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-30 12:14:03.098 +0000,549760489669
687205395435,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216199,ACTIVE,VIDEO,2020-07-30 12:14:03.098 +0000,549760489669
687205395433,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-07-30 12:14:03.097 +0000,549760489669
687205395404,2680065434881,2020-03-26 09:37:17.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216199,ACTIVE,VIDEO,2020-07-30 12:14:03.097 +0000,549760489669
687205395403,2680065434881,2020-03-26 09:37:17.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-30 12:14:03.096 +0000,549760489669
687205395402,2680065434881,2020-03-26 09:37:17.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-07-30 12:14:03.096 +0000,549760489669
687205395400,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-30 12:14:03.095 +0000,549760489669
687205395401,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216199,ACTIVE,VIDEO,2020-07-30 12:14:03.095 +0000,549760489669
687205395399,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-07-30 12:14:03.094 +0000,549760489669
687205395389,2680065434863,2020-03-26 09:35:49.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216199,ACTIVE,VIDEO,2020-07-30 12:14:03.094 +0000,549760489669
687205395388,2680065434863,2020-03-26 09:35:49.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-30 12:14:03.093 +0000,549760489669
687205395387,2680065434863,2020-03-26 09:35:49.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-07-30 12:14:03.093 +0000,549760489669
687205395434,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-24 00:14:18.647 +0000,549760489669
687205395388,2680065434863,2020-03-26 09:35:49.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-23 12:14:01.610 +0000,549760489669
687205395403,2680065434881,2020-03-26 09:37:17.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-07-01 12:14:37.616 +0000,549760489669
687205395434,2680065434898,2020-03-26 09:38:46.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-06-23 18:14:30.000 +0000,549760489669
687205395399,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216220,ACTIVE,VIDEO,2020-06-15 18:14:18.130 +0000,549760489669
687205395400,2680065434868,2020-03-26 09:36:43.000 +0000,https://website.com/page?utm_source=sdfds,8d2b9c960e7bf8a6c22239377c1e6d81,848506386032216135,ACTIVE,VIDEO,2020-05-28 06:14:04.150 +0000,549760489669
6 changes: 5 additions & 1 deletion macros/get_ad_group_history_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
{"name": "created_time", "datatype": dbt.type_timestamp()},
{"name": "end_time", "datatype": dbt.type_timestamp()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "ad_account_id", "datatype": dbt.type_string()},
{"name": "name", "datatype": dbt.type_string()},
{"name": "pacing_delivery_type", "datatype": dbt.type_string()},
{"name": "placement_group", "datatype": dbt.type_string()},
{"name": "start_time", "datatype": dbt.type_timestamp()},
{"name": "status", "datatype": dbt.type_string()}
{"name": "status", "datatype": dbt.type_string()},
{"name": "summary_status", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
8 changes: 3 additions & 5 deletions macros/get_advertiser_history_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "billing_profile_status", "datatype": dbt.type_string()},
{"name": "billing_type", "datatype": dbt.type_string()},
{"name": "country", "datatype": dbt.type_string()},
{"name": "created_time", "datatype": dbt.type_timestamp()},
{"name": "currency", "datatype": dbt.type_string()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "merchant_id", "datatype": dbt.type_string()},
{"name": "name", "datatype": dbt.type_string()},
{"name": "owner_user_id", "datatype": dbt.type_string()},
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
{"name": "status", "datatype": dbt.type_string()},
{"name": "owner_username", "datatype": dbt.type_string()},
{"name": "name", "datatype": dbt.type_string()},
{"name": "permissions", "datatype": dbt.type_string(), "quote": True, "alias": "advertiser_permissions"},
{"name": "updated_time", "datatype": dbt.type_timestamp()}
] %}

Expand Down
4 changes: 4 additions & 0 deletions macros/get_campaign_history_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "created_time", "datatype": dbt.type_timestamp()},
{"name": "default_ad_group_budget_in_micro_currency", "datatype": dbt.type_int()},
{"name": "is_automated_campaign", "datatype": dbt.type_boolean()},
{"name": "is_campaign_budget_optimization", "datatype": dbt.type_boolean()},
{"name": "is_flexible_daily_budgets", "datatype": dbt.type_boolean()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "advertiser_id", "datatype": dbt.type_string()},
{"name": "name", "datatype": dbt.type_string()},
Expand Down
1 change: 1 addition & 0 deletions macros/get_pin_promotion_history_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "ad_group_id", "datatype": dbt.type_string()},
{"name": "ad_account_id", "datatype": dbt.type_string()},
{"name": "android_deep_link", "datatype": dbt.type_string()},
{"name": "click_tracking_url", "datatype": dbt.type_string()},
{"name": "created_time", "datatype": dbt.type_timestamp()},
Expand Down
2 changes: 2 additions & 0 deletions models/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

{% docs campaign_id %} The ID of the related Campaign. {% enddocs %}

{% docs ad_account_id %} The ID of the related Advertiser. {% enddocs %}

{% docs advertiser_id %} The ID of the related Advertiser. {% enddocs %}

{% docs impressions %} The number of paid and earned impressions that occurred on the day of the record. {% enddocs %}
Expand Down
Loading