mirror of
https://github.com/dbt-labs/dbt-project-evaluator.git
synced 2025-12-18 02:11:27 +00:00
macros and other tests
This commit is contained in:
@@ -82,3 +82,8 @@ vars:
|
||||
|
||||
# -- Warehouse specific variables --
|
||||
max_depth_dag: 9
|
||||
|
||||
|
||||
dispatch:
|
||||
- macro_namespace: dbt_utils
|
||||
search_order: ['dbt_project_evaluator', 'dbt_utils']
|
||||
@@ -27,6 +27,8 @@ clean-targets: # directories to be removed by `dbt clean`
|
||||
dispatch:
|
||||
- macro_namespace: dbt
|
||||
search_order: ['dbt_project_evaluator', 'dbt']
|
||||
- macro_namespace: dbt_utils
|
||||
search_order: ['dbt_project_evaluator', 'dbt_utils']
|
||||
|
||||
on-run-end: "{{ dbt_project_evaluator.print_dbt_project_evaluator_issues() }}"
|
||||
|
||||
|
||||
@@ -24,4 +24,10 @@
|
||||
, {{ delimiter_text }}
|
||||
)
|
||||
|
||||
{%- endmacro %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro duckdb__deduplicate(relation, partition_by, order_by) -%}
|
||||
|
||||
{{ return(dbt_utils.snowflake__deduplicate(relation, partition_by, order_by=order_by)) }}
|
||||
|
||||
{% endmacro %}
|
||||
@@ -11,4 +11,10 @@ final as (
|
||||
from _base_exposure_relationships
|
||||
)
|
||||
|
||||
select distinct * from final
|
||||
{{
|
||||
dbt_utils.deduplicate(
|
||||
relation='final',
|
||||
partition_by='unique_id',
|
||||
order_by='is_primary_relationship desc'
|
||||
)
|
||||
}}
|
||||
@@ -11,4 +11,10 @@ final as (
|
||||
from _base_metric_relationships
|
||||
)
|
||||
|
||||
select distinct * from final
|
||||
{{
|
||||
dbt_utils.deduplicate(
|
||||
relation='final',
|
||||
partition_by='unique_id',
|
||||
order_by='is_primary_relationship desc'
|
||||
)
|
||||
}}
|
||||
@@ -11,4 +11,10 @@ final as (
|
||||
from _base_node_relationships
|
||||
)
|
||||
|
||||
select distinct * from final
|
||||
{{
|
||||
dbt_utils.deduplicate(
|
||||
relation='final',
|
||||
partition_by='unique_id',
|
||||
order_by='is_primary_relationship desc'
|
||||
)
|
||||
}}
|
||||
Reference in New Issue
Block a user