-
Notifications
You must be signed in to change notification settings - Fork 20
Update variable declarations #59
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
Changes from 5 commits
bf5c44c
9fc643d
9c6158b
c3d7a8d
95e0eb9
6c66f54
3ccf2de
c89377c
783ef15
5db13cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% macro fill_pass_through_columns(pass_through_variable) %} | ||
|
||
{{ adapter.dispatch('fill_pass_through_columns', 'netsuite_source') (pass_through_variable) }} | ||
|
||
{%- endmacro %} | ||
|
||
{% macro default__fill_pass_through_columns(pass_through_variable) %} | ||
|
||
{% if pass_through_variable %} | ||
{% for field in pass_through_variable %} | ||
{% if field is mapping %} | ||
{% if field.transform_sql %} | ||
, {{ field.transform_sql }} as {{ field.alias if field.alias else field.name }} | ||
{% else %} | ||
, {{ field.alias if field.alias else field.name }} | ||
{% endif %} | ||
{% else %} | ||
, {{ field }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% endmacro %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ final as ( | |
_fivetran_deleted | ||
|
||
--The below macro adds the fields defined within your accounts_pass_through_columns variable into the staging model | ||
{{ fivetran_utils.fill_pass_through_columns('accounts_pass_through_columns') }} | ||
{{ netsuite_source.fill_pass_through_columns(var('accounts_pass_through_columns')) }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we also add a default value for these just in case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a default [] value to each of the new macro calls. |
||
|
||
from fields | ||
) | ||
|
Uh oh!
There was an error while loading. Please reload this page.