mirror of
https://github.com/dbt-labs/dbt-project-evaluator.git
synced 2025-12-18 02:11:27 +00:00
Merge branch 'yml-naming-checks' of github.com:dbt-labs/dbt-project-evaluator into yml-naming-checks
This commit is contained in:
@@ -14,14 +14,11 @@
|
||||
{% if limit_num -%}
|
||||
{%- do exceptions.raise_compiler_error("listagg on DuckDB doesn't support limit_num") -%}
|
||||
{%- endif %}
|
||||
|
||||
{% if order_by_clause -%}
|
||||
{%- do exceptions.warn("listagg on DuckDB doesn't support order_by_clause, you should order your data beforehand") -%}
|
||||
{%- endif %}
|
||||
|
||||
string_agg(
|
||||
{{ measure }}
|
||||
, {{ delimiter_text }}
|
||||
{{ order_by_clause }}
|
||||
)
|
||||
|
||||
{%- endmacro %}
|
||||
@@ -37,7 +37,7 @@ model_fanout_agg as (
|
||||
{{ dbt.listagg(
|
||||
measure = 'child',
|
||||
delimiter_text = "', '",
|
||||
order_by_clause = 'order by child' if target.type in ['snowflake','redshift'])
|
||||
order_by_clause = 'order by child' if target.type in ['snowflake','redshift','duckdb'])
|
||||
}} as leaf_children
|
||||
from model_fanout
|
||||
group by 1, 2
|
||||
|
||||
@@ -16,7 +16,7 @@ multiple_sources_joined as (
|
||||
{{ dbt.listagg(
|
||||
measure='parent',
|
||||
delimiter_text="', '",
|
||||
order_by_clause='order by parent' if target.type in ['snowflake','redshift'])
|
||||
order_by_clause='order by parent' if target.type in ['snowflake','redshift','duckdb'])
|
||||
}} as source_parents
|
||||
from direct_source_relationships
|
||||
group by 1
|
||||
|
||||
@@ -16,7 +16,7 @@ source_fanout as (
|
||||
{{ dbt.listagg(
|
||||
measure='child',
|
||||
delimiter_text="', '",
|
||||
order_by_clause='order by child' if target.type in ['snowflake','redshift'])
|
||||
order_by_clause='order by child' if target.type in ['snowflake','redshift','duckdb'])
|
||||
}} as model_children
|
||||
from direct_source_relationships
|
||||
group by 1
|
||||
|
||||
@@ -17,7 +17,7 @@ appropriate_prefixes as (
|
||||
{{ dbt.listagg(
|
||||
measure='prefix_value',
|
||||
delimiter_text="', '",
|
||||
order_by_clause='order by prefix_value' if target.type in ['snowflake','redshift'])
|
||||
order_by_clause='order by prefix_value' if target.type in ['snowflake','redshift','duckdb'])
|
||||
}} as appropriate_prefixes
|
||||
from naming_convention_prefixes
|
||||
group by model_type
|
||||
|
||||
Reference in New Issue
Block a user