Skip to content

Commit

Permalink
Merge pull request #170 from brooklyn-data/escape_quotes
Browse files Browse the repository at this point in the history
Escape quotes
  • Loading branch information
NiallRees authored Aug 12, 2022
2 parents 3ab5099 + 5dcd914 commit 63c4c8f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration_test_project/models/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ sources:
freshness:
error_after: {count: 24, period: hour}
filter: dayname(updatedat) not in ('Sunday', 'Monday')
loaded_at_field: current_timestamp
loaded_at_field: convert_timezone('UTC', load_timestamp)
tables:
- name: doesnt_exist
2 changes: 1 addition & 1 deletion integration_test_project/models/tests_and_exposures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exposures:
- name: imaginary
type: dashboard
maturity: high
description: "dashboard description"
description: "ceo's favourite dashboard"
url: https://bi.tool/dashboards/1

depends_on:
Expand Down
2 changes: 1 addition & 1 deletion macros/upload_exposures.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'{{ tojson(exposure.owner) }}', {# owner #}
'{{ exposure.maturity }}', {# maturity #}
'{{ exposure.original_file_path | replace('\\', '\\\\') }}', {# path #}
'{{ exposure.description }}', {# description #}
'{{ exposure.description | replace("'","\\'") }}', {# description #}
'{{ exposure.url }}', {# url #}
'{{ exposure.package_name }}', {# package_name #}
'{{ tojson(exposure.depends_on.nodes) }}' {# depends_on_nodes #}
Expand Down
2 changes: 1 addition & 1 deletion macros/upload_sources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'{{ source.loader }}', {# loader #}
'{{ source.name }}', {# name #}
'{{ source.identifier }}', {# identifier #}
'{{ source.loaded_at_field }}', {# loaded_at_field #}
'{{ source.loaded_at_field | replace("'","\\'") }}', {# loaded_at_field #}
'{{ tojson(source.freshness) | replace("'","\\'") }}' {# freshness #}
)
{%- if not loop.last %},{%- endif %}
Expand Down

0 comments on commit 63c4c8f

Please sign in to comment.