File tree Expand file tree Collapse file tree
macros/edr/system/system_utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 {% for column_node in column_nodes .values () %}
5050 {% set all_column_tags_lower = elementary .get_column_tags (column_node) %}
5151
52- {# Skip columns explicitly tagged to show sample rows (if feature is enabled) #}
53- {% if enable_show_tags and elementary .lists_intersection (
54- all_column_tags_lower, show_tags
55- ) | length > 0 %}
56- {% continue %}
57- {% endif %}
52+ {# PII takes precedence: only skip if show_sample_rows is set and pii is not #}
53+ {% set has_show_tag = (
54+ enable_show_tags
55+ and elementary .lists_intersection (
56+ all_column_tags_lower, show_tags
57+ )
58+ | length
59+ > 0
60+ ) %}
61+ {% set has_pii_tag = (
62+ elementary .lists_intersection (all_column_tags_lower, pii_tags)
63+ | length
64+ > 0
65+ ) %}
66+ {% if has_show_tag and not has_pii_tag %} {% continue %} {% endif %}
5867
5968 {% for pii_tag in pii_tags %}
6069 {% if pii_tag in all_column_tags_lower %}
Original file line number Diff line number Diff line change 1717 | list
1818 ) %}
1919
20+ {# PII takes precedence: if model has a PII tag, show_sample_rows is ignored #}
21+ {% set raw_pii_tags = elementary .get_config_var (" pii_tags" ) %}
22+ {% if raw_pii_tags is string %} {% set pii_tags = [raw_pii_tags | lower ] %}
23+ {% else %} {% set pii_tags = (raw_pii_tags or []) | map(" lower" ) | list %}
24+ {% endif %}
25+ {% if elementary .lists_intersection (model_tags, pii_tags) | length > 0 %}
26+ {% do return(false) %}
27+ {% endif %}
28+
2029 {% set intersection = elementary .lists_intersection (model_tags, show_tags) %}
2130 {% do return(intersection | length > 0 ) %}
2231{% endmacro %}
You can’t perform that action at this time.
0 commit comments