From d088d4493e56a72c7aaa61205e75e7079387e1f4 Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Thu, 17 Aug 2023 10:11:03 -0700 Subject: [PATCH] Add doc string context to Identifier validion regex rule (#8440) --- core/dbt/contracts/util.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/dbt/contracts/util.py b/core/dbt/contracts/util.py index 20ee3fd660c..45c712715b5 100644 --- a/core/dbt/contracts/util.py +++ b/core/dbt/contracts/util.py @@ -258,6 +258,13 @@ def validate(cls, data): class Identifier(ValidatedStringMixin): + """Our definition of a valid Identifier is the same as what's valid for an unquoted database table name. + + That is: + 1. It can contain a-z, A-Z, 0-9, and _ + 1. It cannot start with a number + """ + ValidationRegex = r"^[^\d\W]\w*$" @classmethod