Skip to content

Commit 2009619

Browse files
committed
last component of str
1 parent 0e9a655 commit 2009619

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sqlmesh/core/linter/rules/builtin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class FilenameEqualsModelname(Rule):
6363
def check_model(self, model: Model) -> t.Optional[RuleViolation]:
6464
# Rule violated if the model's name (schema.table_name) does not match the file name (foo/bar/table_name.sql).
6565
full_model_name = model.name
66-
table_name = full_model_name.split(".", 1)[1]
66+
table_name = full_model_name.split(".")[-1]
6767
path = Path(model._path)
6868
return (
6969
self.violation()

0 commit comments

Comments
 (0)