Skip to content

Commit

Permalink
Merge pull request #349 from kamilamarcinekpgs/kamilamarcinekpgs-sing…
Browse files Browse the repository at this point in the history
…le-quotes

Update upload_model_executions.sql
  • Loading branch information
jared-rimmer authored May 30, 2023
2 parents 0378fea + cf1409c commit 29509e0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions macros/upload_model_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
'{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}' {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down Expand Up @@ -130,7 +130,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
parse_json('{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}') {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down Expand Up @@ -205,7 +205,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
'{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}' {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down
6 changes: 3 additions & 3 deletions macros/upload_seed_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
'{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}' {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down Expand Up @@ -128,7 +128,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
parse_json('{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}') {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down Expand Up @@ -203,7 +203,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
'{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}' {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down
6 changes: 3 additions & 3 deletions macros/upload_snapshot_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
'{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}' {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down Expand Up @@ -128,7 +128,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
parse_json('{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}') {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down Expand Up @@ -203,7 +203,7 @@
'{{ model.node.schema }}', {# schema #}
'{{ model.node.name }}', {# name #}
'{{ model.node.alias }}', {# alias #}
'{{ model.message }}', {# message #}
'{{ model.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
'{{ tojson(model.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}' {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down
4 changes: 2 additions & 2 deletions macros/upload_test_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{{ test.execution_time }}, {# total_node_runtime #}
null, {# rows_affected not available in Databricks #}
{{ 'null' if test.failures is none else test.failures }}, {# failures #}
'{{ test.message }}', {# message #}
'{{ test.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
'{{ tojson(test.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}' {# adapter_response #}
)
{%- if not loop.last %},{%- endif %}
Expand Down Expand Up @@ -119,7 +119,7 @@
{{ test.execution_time }}, {# total_node_runtime #}
null, {# rows_affected not available in Databricks #}
{{ 'null' if test.failures is none else test.failures }}, {# failures #}
'{{ test.message }}', {# message #}
'{{ test.message | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}', {# message #}
parse_json('{{ tojson(test.adapter_response) | replace("\\", "\\\\") | replace("'", "\\'") | replace('"', '\\"') }}') {# adapter_response #}

)
Expand Down

0 comments on commit 29509e0

Please sign in to comment.