-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingunit testsIssues related to built-in dbt unit testing functionalityIssues related to built-in dbt unit testing functionalitywontfixNot a bug or out of scope for dbt-coreNot a bug or out of scope for dbt-core
Description
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
When I run the unit tests:
dbt test --select test_type:unit
I get back this error:
Compilation Error in model model_a (models/source_a/sources.yml)
Not able to get columns for unit test 'model_a' from relation "dev"."source_a"."model_a"
> in macro get_fixture_sql (macros/unit_test_sql/get_fixture_sql.sql)
> called by model model_a (models/source_a/source.yml)
Unit test:
unit_tests:
- name: test_type_conversions
description: "Check type conversion logic"
model: model_a
given:
- input: source('source_a', 'model_a')
rows:
- {year: '2015', value: '2.9'}
expect:
rows:
- {year: 2015, absence_rate_total: 2.9}
Expected Behavior
The unit test runs to completion.
Steps To Reproduce
- Configure duckdb as the warehouse using the dbt-duckdb adapter version 1.8.1
- Create a unit test for a model
- Run it using the command:
dbt test --select test_type:unit
Relevant log output
No response
Environment
- OS: MacOS Monterey 12.4
- Python: 3.11.9
- dbt: 1.8.2Which database adapter are you using with dbt?
other (mention it in "Additional Context")
Additional Context
Using dbt-duckdb 1.8.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingunit testsIssues related to built-in dbt unit testing functionalityIssues related to built-in dbt unit testing functionalitywontfixNot a bug or out of scope for dbt-coreNot a bug or out of scope for dbt-core