Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ele 4006 support test description #778

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions macros/edr/dbt_artifacts/upload_dbt_tests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,18 @@
{% 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', []) %}
{% set global_tags = elementary.safe_get_with_default(node_dict, 'tags', []) %}
{% set meta_tags = elementary.safe_get_with_default(meta_dict, 'tags', []) %}
Expand Down Expand Up @@ -160,7 +165,7 @@
'depends_on_macros': elementary.filter_none_and_sort(depends_on_dict.get('macros', [])),
'depends_on_nodes': elementary.filter_none_and_sort(depends_on_dict.get('nodes', [])),
'parent_model_unique_id': primary_test_model_id.data,
'description': meta_dict.get('description'),
'description': description,
'name': node_dict.get('name'),
'package_name': node_dict.get('package_name'),
'type': elementary.get_test_sub_type(original_file_path, test_namespace),
Expand Down
Loading