Skip to content

Commit 7dddc77

Browse files
committed
fix: use string check for show_sample_rows_tags normalization to avoid char-splitting
1 parent ea16e47 commit 7dddc77

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

macros/edr/system/system_utils/get_pii_columns_from_parent_model.sql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@
4242
"enable_samples_on_show_sample_rows_tags"
4343
) %}
4444
{% set raw_show_tags = elementary.get_config_var("show_sample_rows_tags") %}
45-
{% set show_tags = (
46-
(raw_show_tags if raw_show_tags is iterable else [raw_show_tags])
47-
| map("lower")
48-
| list
49-
) %}
45+
{% if raw_show_tags is string %} {% set show_tags = [raw_show_tags | lower] %}
46+
{% else %} {% set show_tags = (raw_show_tags or []) | map("lower") | list %}
47+
{% endif %}
5048

5149
{% for column_node in column_nodes.values() %}
5250
{% set all_column_tags_lower = elementary.get_column_tags(column_node) %}

macros/edr/system/system_utils/is_show_sample_rows_table.sql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
{% endif %}
55

66
{% set raw_show_tags = elementary.get_config_var("show_sample_rows_tags") %}
7-
{% set show_tags = (
8-
(raw_show_tags if raw_show_tags is iterable else [raw_show_tags])
9-
| map("lower")
10-
| list
11-
) %}
7+
{% if raw_show_tags is string %} {% set show_tags = [raw_show_tags | lower] %}
8+
{% else %} {% set show_tags = (raw_show_tags or []) | map("lower") | list %}
9+
{% endif %}
1210

1311
{% set raw_model_tags = elementary.insensitive_get_dict_value(
1412
flattened_test, "model_tags", []

0 commit comments

Comments
 (0)