Skip to content

Commit

Permalink
Add doc string context to Identifier validion regex rule (#8440)
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm authored Aug 17, 2023
1 parent 770f804 commit d088d44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/dbt/contracts/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d088d44

Please sign in to comment.