diff --git a/integration_tests/macros/tests/codegen/test_generate_secured_model_schema_v2.sql b/integration_tests/macros/tests/codegen/test_generate_secured_model_schema_v2.sql index 6fb609f..68cbc6e 100644 --- a/integration_tests/macros/tests/codegen/test_generate_secured_model_schema_v2.sql +++ b/integration_tests/macros/tests/codegen/test_generate_secured_model_schema_v2.sql @@ -34,13 +34,7 @@ "policy_tags": ["unique_identifier"], "test_project__test_dataset__test_table": { "tests": [ - { - "not_null": { - "config": { - "where": "1 = 1" - } - } - } + "not_null" ], }, }, @@ -129,7 +123,7 @@ models: data_privacy: level: internal data_tests: - - {"not_null": {"config": {"where": "1=1"}}} + - not_null {%- endraw -%} {%- endset %} diff --git a/macros/codegen/generate_secured_model_schema_v2.sql b/macros/codegen/generate_secured_model_schema_v2.sql index f5bcbcc..17df3a7 100644 --- a/macros/codegen/generate_secured_model_schema_v2.sql +++ b/macros/codegen/generate_secured_model_schema_v2.sql @@ -87,12 +87,7 @@ models: {%- set data_tests = column.meta.data_privacy[name].get('data_tests', []) + column.meta.data_privacy[name].get('tests', []) %} data_tests: {%- for data_test in data_tests %} - {%- if data_test is mapping %} - {#- Convert to single line as we assume embedded JSON is ok in YAML #} - - {{ data_test | tojson }} - {%- else %} - {{ data_test }} - {%- endif %} {%- endfor %} {%- endif %} {%- endfor %}