-
Notifications
You must be signed in to change notification settings - Fork 5
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/conversions #21
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9485f25
add converions
fivetran-reneeli d9d13ac
add conversions, update versions and readme
fivetran-reneeli 0929788
add backwards compat
fivetran-reneeli df40df8
docs and update seed
fivetran-reneeli 5fef87c
changelog
fivetran-reneeli 67865cd
forgot to add conversion metrics here
fivetran-reneeli a26051f
updates
fivetran-reneeli 888892a
try new schema
fivetran-reneeli 54cf3ed
looks pretty good
fivetran-jamie 818b207
remove emoji :(
fivetran-jamie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
campaign_id,date,_fivetran_synced,campaign_applicable_budget_rule_id,campaign_applicable_budget_rule_name,campaign_bidding_strategy,campaign_budget_amount,campaign_budget_currency_code,campaign_budget_type,clicks,cost,impressions,campaign_rule_based_budget_amount | ||
2187,2022-07-26,2022-10-14 11:54:40.980000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
2187,2022-07-21,2022-10-14 11:52:57.796000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
2187,2022-08-29,2022-10-14 11:40:45.808000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
2187,2022-08-31,2022-10-14 11:42:29.065000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
2187,2022-07-27,2022-10-14 11:54:40.980000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
2187,2022-08-28,2022-10-14 11:40:45.807000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
2187,2022-09-06,2022-10-14 11:42:29.062000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
2187,2022-07-11,2022-10-14 12:07:12.424000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET0.0,2,1.67,1095, | ||
2187,2022-07-15,2022-10-14 12:07:12.428000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
2187,2022-07-18,2022-10-14 11:52:57.802000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,, | ||
campaign_id,date,_fivetran_synced,campaign_applicable_budget_rule_id,campaign_applicable_budget_rule_name,campaign_bidding_strategy,campaign_budget_amount,campaign_budget_currency_code,campaign_budget_type,clicks,cost,impressions,campaign_rule_based_budget_amount,sales_7_d,purchases_30_d,sales_30_d | ||
2187,2022-07-26,2022-10-14 11:54:40.980000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,12,44,54 | ||
2187,2022-07-21,2022-10-14 11:52:57.796000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,2,34,345 | ||
2187,2022-08-29,2022-10-14 11:40:45.808000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,,, | ||
2187,2022-08-31,2022-10-14 11:42:29.065000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,,, | ||
2187,2022-07-27,2022-10-14 11:54:40.980000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,3,35,350 | ||
2187,2022-08-28,2022-10-14 11:40:45.807000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,,, | ||
2187,2022-09-06,2022-10-14 11:42:29.062000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,4,24,335 | ||
2187,2022-07-11,2022-10-14 12:07:12.424000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET0.0,2,1.67,1095,,0,64,234 | ||
2187,2022-07-15,2022-10-14 12:07:12.428000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,,, | ||
2187,2022-07-18,2022-10-14 11:52:57.802000,,,optimizeForSales,2000.0,USD,DAILY_BUDGET,0,0.0,,,,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{# Backwards compatible version of fivetran_utils.add_pass_through_columns #} | ||
|
||
{% macro amazon_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %} | ||
|
||
{% if pass_through_fields %} | ||
{% for column in pass_through_fields %} | ||
|
||
{% if column is mapping %} | ||
{% set col_name = column.alias|default(column.name)|lower %} | ||
|
||
{% if col_name not in except_fields %} | ||
{% if column.alias %} | ||
{% do base_columns.append({ "name": column.name, "alias": column.alias, "datatype": column.datatype if column.datatype else dbt.type_string()}) %} | ||
{% else %} | ||
{% do base_columns.append({ "name": column.name, "datatype": column.datatype if column.datatype else dbt.type_string()}) %} | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% else %} | ||
{% if column|lower not in except_fields %} | ||
{% do base_columns.append({ "name": column, "datatype": dbt.type_string()}) %} | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% endfor %} | ||
{% endif %} | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{# Backwards compatible version of fivetran_utils.fill_pass_through_columns #} | ||
|
||
{% macro amazon_ads_fill_pass_through_columns(pass_through_fields, except=[]) %} | ||
|
||
{% if pass_through_fields %} | ||
{% for field in pass_through_fields %} | ||
{% if (field.alias if field.alias else field.name) not in except %} | ||
{% if field.transform_sql %} | ||
, coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }} | ||
{% else %} | ||
, coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }} | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question about if there is a reason this is different than the other versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no real reason -- I just noticed this was inconsistent with some other packages and updated it accordingly. I can revert this if preferable!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No this is okay to keep, I just wanted to make sure there wasn't a specific reason and if we needed to adjust our dbt required version for this update. All good to keep. Thanks!