You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
14 of 15 ERROR relationships_dm_est_unit_economics_dbt_listing_id__listing_id__ref_stg_dm_unit_product_pool_online_ [ERROR in 0.45s]
Database Error in test relationships_dm_est_unit_economics_dbt_listing_id__listing_id__ref_stg_dm_unit_product_pool_online_ (models/dm_est_unit_economics/marts/_dm_est_unit_economics.yml)
Code: 62.
DB::Exception: Syntax error: failed at position 769 ('limit') (line 34, col 7): limit 100
) dbt_internal_test. Expected one of: UNION, EXCEPT, INTERSECT. Stack trace:
DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xe11e335 in /usr/bin/clickhouse
? @ 0x8d1cc2d in /usr/bin/clickhouse
Steps to reproduce
set global tests setting in dbt_project.yml
`
tests:
+warn_if: ">20"
+error_if: ">50"
+limit: 100
- relationships:
to: ref('stg_dm_unit_product_pool_online')
field: listing_id
`
Expected behaviour
Code examples, such as models or profile settings
the run code is here, the limit clause is after the setting clause.
`select
count() as failures,
count() >20 as should_warn,
count(*) >50 as should_error
from (
with child as (
select listing_id as from_field
from dbt_dev.dm_est_unit_economics_dbt
where listing_id is not null
),
parent as (
select listing_id as to_field
from dbt_dev.stg_dm_unit_product_pool_online
)
select
from_field
from child
left join parent
on child.from_field = parent.to_field
where parent.to_field is null
settings join_use_nulls = 1
limit 100
) dbt_internal_test
`
dbt and/or ClickHouse server logs
Configuration
Environment
dbt version: 1.7.4
dbt-clickhouse version: 1.7.1
clickhouse-driver version (if using native): 0.2.6
Describe the bug
14 of 15 ERROR relationships_dm_est_unit_economics_dbt_listing_id__listing_id__ref_stg_dm_unit_product_pool_online_ [ERROR in 0.45s]
Database Error in test relationships_dm_est_unit_economics_dbt_listing_id__listing_id__ref_stg_dm_unit_product_pool_online_ (models/dm_est_unit_economics/marts/_dm_est_unit_economics.yml)
Code: 62.
DB::Exception: Syntax error: failed at position 769 ('limit') (line 34, col 7): limit 100
) dbt_internal_test. Expected one of: UNION, EXCEPT, INTERSECT. Stack trace:
Steps to reproduce
`
tests:
+warn_if: ">20"
+error_if: ">50"
+limit: 100
2. add test like this:
name: listing_id
tests:
- unique:
config:
where: listing_id>0
`
Expected behaviour
Code examples, such as models or profile settings
the run code is here, the limit clause is after the setting clause.
`select
count() as failures,
count() >20 as should_warn,
count(*) >50 as should_error
from (
with child as (
select listing_id as from_field
from
dbt_dev
.dm_est_unit_economics_dbt
where listing_id is not null
),
parent as (
select listing_id as to_field
from
dbt_dev
.stg_dm_unit_product_pool_online
)
select
from_field
from child
left join parent
on child.from_field = parent.to_field
where parent.to_field is null
settings join_use_nulls = 1
`
dbt and/or ClickHouse server logs
Configuration
Environment
ClickHouse server
CREATE TABLE
statements for tables involved:The text was updated successfully, but these errors were encountered: