Fix: unique, user-friendly audit names for custom named dbt tests#5484
Merged
Fix: unique, user-friendly audit names for custom named dbt tests#5484
Conversation
erindru
approved these changes
Oct 5, 2025
430b68c to
5415b5c
Compare
5415b5c to
65774e6
Compare
c1f9c13 to
b2e383f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dbt does not automatically generate a unique, user-friendly name for tests whose
namefield is populated in their YAML definition - this can result in duplicate names.We can use the
unique_id, but its hash is not user-friendly. Therefore, we construct a name equivalent to those of tests with default names.Note: there is no way to statically determine whether a test's
namefield was specified based solely on the manifest node. Therefore, we must construct the default auto-generated name to determine whether we need to construct the custom name.Ref: https://github.com/dbt-labs/dbt-core/blob/db9a6e10c17c709e87b30f964c25b715536393f9/core/dbt/parser/generic_test_builders.py#L279