Skip to content

Commit 185e6ae

Browse files
author
paul.marcombes
committed
doc: manage multiline strings
1 parent 194d90d commit 185e6ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bigfun/templates/bigfunction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ create temp table sample_data as (
198198
{{ example.temp_table | indent(6) }}
199199
);
200200
{% endif %}
201-
{% if type == 'procedure' %}call{% elif type == 'table_function' %}select * from{% else %}select{% endif %} {{ project }}.{{ dataset }}.{{ name }}({% for argument in example.arguments %}{% if argument is none or argument == 'null' %}null{% elif arguments[loop.index0]['type'] == 'string' %}{{ argument | trim('"') | trim("'") | tojson() | replace('{BIGFUNCTIONS_DATASET}', project + '.' + dataset ) | replace('\n', '\n ') }}{% else %}{{ argument | replace('{BIGFUNCTIONS_DATASET}', project + '.' + dataset ) | replace('\n', '\n ') }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}){% if type == 'procedure' %};{% elif 'output' in bigfunction and type != 'table_function' %} as {{ output.name }}{% endif %}
201+
{% if type == 'procedure' %}call{% elif type == 'table_function' %}select * from{% else %}select{% endif %} {{ project }}.{{ dataset }}.{{ name }}({% for argument in example.arguments %}{% if argument is none or argument == 'null' %}null{% elif arguments[loop.index0]['type'] == 'string' and '\n' not in argument %}{{ argument | trim('"') | trim("'") | tojson() | replace('{BIGFUNCTIONS_DATASET}', project + '.' + dataset ) | replace('\n', '\n ') }}{% else %}{{ argument | replace('{BIGFUNCTIONS_DATASET}', project + '.' + dataset ) | replace('\n', '\n ') }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}){% if type == 'procedure' %};{% elif 'output' in bigfunction and type != 'table_function' %} as {{ output.name }}{% endif %}
202202
{%- if (example.with_clause is defined or example.temp_table is defined) and type != 'table_function' %}
203203
from sample_data
204204
{% endif %}

0 commit comments

Comments
 (0)