Skip to content

Commit

Permalink
remove default from meta
Browse files Browse the repository at this point in the history
  • Loading branch information
NoyaArie committed Jan 29, 2025
1 parent 4cd1d57 commit c2c99e0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions macros/edr/dbt_artifacts/upload_dbt_tests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,16 @@
{% set default_description = elementary.get_default_description(test_original_name, test_namespace) %}

{% set config_meta_dict = elementary.safe_get_with_default(config_dict, 'meta', {}) %}
{% set meta_dict = {} %}
{% if default_description %}
{% set meta_dict = {'description': default_description} %}
{% endif %}
{% do meta_dict.update(elementary.safe_get_with_default(node_dict, 'meta', {})) %}
{% set meta_dict = elementary.safe_get_with_default(node_dict, 'meta', {}) %}
{% do meta_dict.update(config_meta_dict) %}

{% set description = none %}
{% if dbt_version >= '1.9.0' and node_dict.get('description') %}
{% set description = node_dict.get('description') %}
{% elif meta_dict.get('description') %}
{% set description = meta_dict.pop('description') %}
{% elif default_description %}
{% set description = default_description %}
{% endif %}

{% set config_tags = elementary.safe_get_with_default(config_dict, 'tags', []) %}
Expand Down

0 comments on commit c2c99e0

Please sign in to comment.