-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Feature] Custom test name not honoured in "config" blocks #9740
Comments
Here's the use-case for it: We use Now, because the data may be inconsistent (I'm loading it from several source systems which may serve out-of-sync, or corrupted information), I'd like to run So I thought I could name the tests using the As a workaround:
|
Thanks for describing your use case and what you ran into @mkielar ! The docs you referenced only applies to the I buy it that you should be able to customize the Since we'd be unable to prioritize this ourselves any time soon, I'm going to mark this as "help wanted". |
Hey @dbeatty10 , |
@dbeatty10 @mkielar I'm more than happy to throw my name in the hat for this (with a little guidance). Roughly this requirement has come up at my work so fixing at source seems smarter than whatever terrible ideas I had for tackling this locally. |
Is this a new bug in dbt-core?
Current Behavior
According to https://docs.getdbt.com/reference/resource-properties/data-tests#custom-data-test-name, one can specify
name
attribute in test configuration, to override default naming schemedbt
uses to print test reports.The
name
attribute works well when specified inmodels.yml
, but doesn't work in{{ config() }}
blocks inside.sql
files (which is why I report this as a bug).Expected Behavior
I'd expect consistent behaviour - the
name
attribute should be honoured in both cases.Steps To Reproduce
I have two tests.
The first one is defined in
models.yml
like this:The second, is a custom, singular data test, in a file called
assert_example.sql
, which looks like this:Then, when I run
dbt test
, I get this:As you can see:
models.yml
, thename
attribute is honoured..sql
file, configured via{{ config() }}
block, thename
attribute is not honoured.Relevant log output
See: _"Steps to reproduce"_.
Environment
Which database adapter are you using with dbt?
bigquery
Additional Context
No response
The text was updated successfully, but these errors were encountered: