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

[Bug] +store_failures config in singular tests not working in Fabric #239

Open
daviddobos opened this issue Nov 4, 2024 · 1 comment
Open

Comments

@daviddobos
Copy link

Is this a new bug in dbt-core?
I believe this is a new bug in dbt-core
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
The store_failures config is set(false) in a singular test and in the dbt_project.yml at a project lvl(true). This shouldn't work like this according to the config inheritance https://docs.getdbt.com/reference/configs-and-properties

Expected Behavior
store_failures should be false for the singular test but its true.

Steps To Reproduce
Setup a dbt-fabric project
Specify the store_failures config in data_tests(dbt_project.yml) and for the singular test.
Set connection with the fabric data warehouse

dbt_project.yml

version: "1.0.0"
config-version: 2

profile: "default"
...
data_tests:
  +store_failures: true

stg_customers.sql

with customers as (
    
    select * from {{ ref("raw_customers") }}
)

select * from customers

raw_customers.csv

id,first_name,last_name,email
1,Michael,P,[email protected]
1,Paris, H, [email protected]
2,Shawn,M,[email protected]
2,Harry,P,[email protected]
3,Kathleen,P,[email protected]
4,Jimmy,C,[email protected]
5,Katherine,R,[email protected]

tst_invalid_id.sql

{{ config(store_failures = false) }}

with invalid as (
select 
* 
from stg_customers
where id is null
)

select * from invalid

Set connection in your profiles.yml file. (something like this)

jaffle_shop: 
  target: dev 
  outputs:
    dev: 
      authentication: CLI 
      database: jaffle-shop-warehouse
      driver: ODBC Driver 18 for SQL Server 
      host: <sql end point to the fabric warehouse>
      schema: <schema name>
      threads: 4 
      type: fabric 

Run dbt test --select tst_invalid_id

It will create an output table in the fabric warehouse.

Environment

- OS: windows 11 pro
- dbt=1.8.1
- fabric=1.8.6
@prdpsvs
Copy link
Collaborator

prdpsvs commented Dec 22, 2024

It looks like the config.get(store_failures) is not using model or data tests level config. I have created a bug in dbt-adapters dbt-labs/dbt-adapters#395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants