Skip to content

Commit

Permalink
Revert "jsonify the embedded data_tests (#78)" (#79)
Browse files Browse the repository at this point in the history
This reverts commit b421d7e.
  • Loading branch information
yu-iskw authored Aug 7, 2024
1 parent b421d7e commit dd33544
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@
"policy_tags": ["unique_identifier"],
"test_project__test_dataset__test_table": {
"tests": [
{
"not_null": {
"config": {
"where": "1 = 1"
}
}
}
"not_null"
],
},
},
Expand Down Expand Up @@ -129,7 +123,7 @@ models:
data_privacy:
level: internal
data_tests:
- {"not_null": {"config": {"where": "1=1"}}}
- not_null
{%- endraw -%}
{%- endset %}

Expand Down
5 changes: 0 additions & 5 deletions macros/codegen/generate_secured_model_schema_v2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit dd33544

Please sign in to comment.