Skip to content

Commit

Permalink
Update bigquery__get_invocations_dml_sql to use safe.parse_json for i…
Browse files Browse the repository at this point in the history
…nvocation args (#285)

Co-authored-by: Joey Davis <JosephDavis@users.noreply.github.com>
  • Loading branch information
JosephDavis and JosephDavis authored Apr 24, 2023
1 parent 3b91bc4 commit c9c6984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions macros/upload_invocations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@
{% set parsed_inv_args_vars = fromyaml(invocation_args_dict.vars) %}
{% do invocation_args_dict.update({'vars': parsed_inv_args_vars}) %}
{% endif %}

parse_json('{{ tojson(invocation_args_dict) }}'), {# invocation_args #}
{# invocation_args_dict.vars, in the absence of any vars, results in the value "{}\n" as a string which results in an error. safe.parse_json accomodates for this gracefully. #}
safe.parse_json('{{ tojson(invocation_args_dict) }}'), {# invocation_args #}
parse_json('{{ tojson(dbt_metadata_envs) }}') {# dbt_custom_envs #}

)
Expand Down

0 comments on commit c9c6984

Please sign in to comment.