Skip to content

Commit 605bdd0

Browse files
joostboonclaude
andcommitted
style: apply sqlfmt formatting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 19f2367 commit 605bdd0

3 files changed

Lines changed: 19 additions & 13 deletions

File tree

macros/edr/materializations/test/test.sql

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,14 @@
8686
4. PII tag detection (model/test/column) — hide when disable_samples_on_pii_tags
8787
is true and a PII tag is detected at any level.
8888
#}
89-
{% if disable_test_samples %}
90-
{% set sample_limit = 0 %}
89+
{% if disable_test_samples %} {% set sample_limit = 0 %}
9190
{% elif elementary.should_show_sample_rows(flattened_test) %}
92-
{# Tag explicitly opts in — keep sample_limit as-is #}
91+
{# Tag explicitly opts in — keep sample_limit as-is #}
9392
{% elif elementary.get_config_var("enable_samples_on_show_sample_rows_tags") %}
9493
{# Feature is on but no show_sample_rows tag found — hide by default #}
9594
{% set sample_limit = 0 %}
96-
{% elif elementary.is_pii_table(flattened_test) %}
97-
{% set sample_limit = 0 %}
98-
{% elif elementary.is_pii_test(flattened_test) %}
99-
{% set sample_limit = 0 %}
95+
{% elif elementary.is_pii_table(flattened_test) %} {% set sample_limit = 0 %}
96+
{% elif elementary.is_pii_test(flattened_test) %} {% set sample_limit = 0 %}
10097
{% elif elementary.should_disable_sampling_for_pii(flattened_test) %}
10198
{% set sample_limit = 0 %}
10299
{% endif %}

macros/edr/system/system_utils/get_pii_columns_from_parent_model.sql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@
5656
{% set all_column_tags_lower = elementary.get_column_tags(column_node) %}
5757

5858
{# Skip column from PII list only if show_sample_rows is set and pii is not #}
59-
{% set has_show_tag = (
60-
enable_show_tags
61-
and (elementary.lists_intersection(all_column_tags_lower, show_tags) | length > 0)
59+
{% set has_show_tag = enable_show_tags and (
60+
elementary.lists_intersection(all_column_tags_lower, show_tags)
61+
| length
62+
> 0
6263
) %}
6364
{% set has_pii_tag = (
64-
elementary.lists_intersection(all_column_tags_lower, pii_tags) | length > 0
65+
elementary.lists_intersection(all_column_tags_lower, pii_tags)
66+
| length
67+
> 0
6568
) %}
6669
{% if has_show_tag and not has_pii_tag %} {% continue %} {% endif %}
6770

macros/edr/system/system_utils/should_show_sample_rows.sql

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,14 @@
9090
) | length > 0 %}
9191
{# PII on the column or model takes precedence over show_sample_rows #}
9292
{% if check_pii and (
93-
elementary.lists_intersection(col_tags, pii_tags) | length > 0
94-
or elementary.lists_intersection(model_tags, pii_tags) | length > 0
93+
elementary.lists_intersection(col_tags, pii_tags)
94+
| length
95+
> 0
96+
or elementary.lists_intersection(
97+
model_tags, pii_tags
98+
)
99+
| length
100+
> 0
95101
) %}
96102
{% do return(false) %}
97103
{% endif %}

0 commit comments

Comments
 (0)