From 75b2f437635c3c01c6100be5fa320cc9040fa36f Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Thu, 24 Mar 2022 13:57:38 +0100 Subject: [PATCH] Update comments, rm TODO --- core/dbt/parser/generic_test_builders.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/dbt/parser/generic_test_builders.py b/core/dbt/parser/generic_test_builders.py index 2e4d9588e25..c2f6fe25fe4 100644 --- a/core/dbt/parser/generic_test_builders.py +++ b/core/dbt/parser/generic_test_builders.py @@ -29,6 +29,7 @@ def synthesize_generic_test_names( test_type: str, test_name: str, args: Dict[str, Any] ) -> Tuple[str, str]: # Using the type, name, and arguments to this generic test, synthesize a (hopefully) unique name + # Will not be unique if multiple tests have same name + arguments, and only configs differ # Returns a shorter version (hashed/truncated, for the compiled file) # as well as the full name (for the unique_id + FQN) flat_args = [] @@ -273,10 +274,8 @@ def __init__( self.fqn_name: str = "" if "name" in self.args: - # TODO: Should we append the model name to the test name here? - # Or trust the user to have globally unique names within their project? - # Logic like this, with accounting for source table targets: - # generic_test_name = f"{self.args["name"]}_{target.name}" + # Trust the user to have a unique name for this model + column combo + # otherwise, raise_duplicate_resource_name later on self.compiled_name = self.args["name"] self.fqn_name = self.args["name"] del self.args["name"]