Skip to content

Commit

Permalink
revise magicbot
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-catfritz committed Aug 29, 2023
1 parent 03f39d2 commit f8682f4
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 20 deletions.
1 change: 0 additions & 1 deletion models/amazon_ads.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
UPDATE TESTS AND CHECK SOURCE_RELATION ADDED PROPERLY!!! (delete line when done.)
version: 2

models:
Expand Down
2 changes: 0 additions & 2 deletions models/amazon_ads__account_report.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ADD source_relation WHERE NEEDED + CHECK JOINS AND WINDOW FUNCTIONS! (Delete this line when done.)

{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}

with report as (
Expand Down
2 changes: 0 additions & 2 deletions models/amazon_ads__ad_group_report.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ADD source_relation WHERE NEEDED + CHECK JOINS AND WINDOW FUNCTIONS! (Delete this line when done.)

{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}

with report as (
Expand Down
2 changes: 0 additions & 2 deletions models/amazon_ads__ad_report.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ADD source_relation WHERE NEEDED + CHECK JOINS AND WINDOW FUNCTIONS! (Delete this line when done.)

{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}

with report as (
Expand Down
2 changes: 0 additions & 2 deletions models/amazon_ads__campaign_report.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ADD source_relation WHERE NEEDED + CHECK JOINS AND WINDOW FUNCTIONS! (Delete this line when done.)

{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}

with report as (
Expand Down
2 changes: 0 additions & 2 deletions models/amazon_ads__keyword_report.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ADD source_relation WHERE NEEDED + CHECK JOINS AND WINDOW FUNCTIONS! (Delete this line when done.)

{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}

with report as (
Expand Down
2 changes: 0 additions & 2 deletions models/amazon_ads__portfolio_report.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ADD source_relation WHERE NEEDED + CHECK JOINS AND WINDOW FUNCTIONS! (Delete this line when done.)

{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__amazon_ads_enabled','amazon_ads__portfolio_history_enabled'])) }}

with report as (
Expand Down
2 changes: 0 additions & 2 deletions models/amazon_ads__search_report.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ADD source_relation WHERE NEEDED + CHECK JOINS AND WINDOW FUNCTIONS! (Delete this line when done.)

{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}

with report as (
Expand Down
1 change: 1 addition & 0 deletions models/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ The state of the record (enabled, paused, or archived).
{% docs targeting %}
A string representation of the expression object used in the targeting clause.
{% enddocs %}

{% docs source_relation %}
The source of the record if the unioning functionality is being used. If not this field will be empty.
{% enddocs %}
3 changes: 1 addition & 2 deletions models/intermediate/int_amazon_ads__portfolio_history.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ADD source_relation WHERE NEEDED + CHECK JOINS AND WINDOW FUNCTIONS! (Delete this line when done.)

{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}

{# This intermediate model creates a dummy portfolio table if the user does not use portfolios.
Expand All @@ -12,6 +10,7 @@ with portfolios as (
from {{ var('portfolio_history') }}
where is_most_recent_record = True
{% else %}
cast(null as {{ dbt.type_string() }}) as source_relation,
{# uses the columns macro from the source package to populate column names #}
{%- set columns = amazon_ads_source.get_portfolio_history_columns() -%}
{% for column in columns %}
Expand Down
6 changes: 3 additions & 3 deletions packages.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packages:
- package: fivetran/amazon_ads_source
version: [">=0.2.0", "<0.3.0"]
# - package: fivetran/amazon_ads_source
# version: [">=0.2.0", "<0.3.0"]

- git: https://github.com/fivetran/amazon_ads_source.git
- git: https://github.com/fivetran/dbt_amazon_ads_source.git
revision: MagicBot/add-union-schema
warn-unpinned: false

0 comments on commit f8682f4

Please sign in to comment.