Closed simon-sandell-swedavia-se closed 7 months ago
The defaultconcat macro supports calling with 1..n columns, while the fabricconcat macro will fail with 1 column. This inconsistent behaviour can be avoided with something like this:
{% macro fabric__concat(fields) -%} {%- if fields|length < 2 -%} {{ fields[0] }} {%- else -%} concat({{ fields|join(', ') }}) {%- endif -%} {%- endmacro %}
The defaultconcat macro supports calling with 1..n columns, while the fabricconcat macro will fail with 1 column. This inconsistent behaviour can be avoided with something like this: