File tree Expand file tree Collapse file tree 3 files changed +16
-16
lines changed
Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 1- version = "1.9.2 "
1+ version = "1.9.3 "
Original file line number Diff line number Diff line change 5252 SELECT * FROM dbt_internal_unit_test_expected
5353
5454{%- endmacro %}
55-
56-
57- {% macro fabric__generate_schema_name(custom_schema_name, node) - %}
58-
59- {%- set default_schema = target .schema - %}
60- {%- if custom_schema_name is none - %}
61- {{ default_schema }}
62- {%- else - %}
63- {{ custom_schema_name | trim }}
64- {%- endif - %}
65- {%- endmacro %}
Original file line number Diff line number Diff line change 11{% macro fabric__split_part(string_text, delimiter_text, part_number) %}
2- {% if part_number >= 0 %}
3- (select value from string_split({{ string_text }}, {{ delimiter_text }}, 1 ) where ordinal = {{ part_number }})
2+ WITH SplitData AS (
3+ SELECT value,
4+ {% if part_number > 0 %}
5+ , ROW_NUMBER() OVER (ORDER BY ordinal ASC ) AS forward_index
6+ {% else %}
7+ , ROW_NUMBER() OVER (ORDER BY ordinal DESC ) AS backward_index
8+ {% endif %}
9+ FROM string_split({{ string_text }}, {{ delimiter_text }}, 1 )
10+ )
11+ SELECT value
12+ FROM SplitData
13+ WHERE
14+ {% if part_number > 0 %}
15+ forward_index = {{ part_number }}
416 {% else %}
5- (select value from string_split({{ string_text }}, {{ delimiter_text }}, 1 )
6- where ordinal = len(replace({{ string_text }}, {{delimiter_text}}, ' ' )) + 1 + {{ part_number }})
17+ backward_index = {{ abs(part_number) }}
718 {% endif %}
819{% endmacro %}
You can’t perform that action at this time.
0 commit comments