microsoft / dbt-fabric

MIT License
79 stars 28 forks source link

[Bug] dbt test creates temp views when store_failures_as: table #240

Open daviddobos opened 1 week ago

daviddobos commented 1 week ago

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 dbt test creates both temp views and tables when store_failures_as is set to tables.

Expected Behaviour dbt test should create only tables/delete the tmp views after creating the tables

Steps to Reproduce

  1. create a model + .yml with 1 generic test on a column
  2. set the models and data_tests in dbt_project.yml
  3. run dbt test

part of my dbt_project.yml

models:
  +on_schema_change: "sync_all_columns"
  random_name_dbt:
    010_bronze:
      +schema: bronze
      +materialized: table
    015_int:
      +schema: int
      +materialized: table
    020_silver:
      +schema: silver
      +materialized: table
    030_gold:
      +schema: gold
      +materialized: table
    040_dq:
      +schema: dq
      +materialized: table

data_tests:
  +store_failures: true
  +schema: dq
  +store_failures_as: table

These are the created temp views.

Image

Environment

- OS: windows 11 pro
- dbt=1.8.1
- fabric=1.8.6