[CT-3496] allow "missing" inputs for inputs where you want to use empty mock data for unit test #9282
Labels
enhancement
New feature or request
unit tests
Issues related to built-in dbt unit testing functionality
Is this your first time submitting a feature request?
Describe the feature
Let's say I'm working in the above dbt project.
I want to add a unit test to my
dim_wizards
- specifically, I want to test myis_valid_email_address
logic:Even though
dim_wizards
depends on three nodes:stg_worlds
modelstg_wizards
modeltop_level_email_domains
seedI only want to supply mock input data for the nodes that are relevant to my test.
In this case, that's just a few columns from
stg_wizards
and a column fromtop_level_email_domains
. Thestg_worlds
model is completely irrelevant for this unit test.If I don't include
stg_worlds
in my unit test definition, however,dbt build
doesn't work quite right:I think this error is because:
stg_worlds
If I reference
stg_worlds
in my unit test definition, but don't supply any mock data...I get a different error:
If I don't include
rows:
at all...I get a different error:
Describe alternatives you've considered
The work-around I used was adding a dummy single row for
stg_worlds
:I would like some way to be able to input no mock data for certain inputs.
Who will this benefit?
No response
Are you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: