Skip to content

Commit 6ea8019

Browse files
committed
Lowercase blueprint variables as early as possible
1 parent 3ce78b7 commit 6ea8019

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sqlmesh/core/model/definition.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,11 +1914,11 @@ def _extract_blueprint_variables(blueprint: t.Any, path: Path) -> t.Dict[str, t.
19141914
return {}
19151915
if isinstance(blueprint, (exp.Paren, exp.PropertyEQ)):
19161916
blueprint = blueprint.unnest()
1917-
return {blueprint.left.name: blueprint.right}
1917+
return {blueprint.left.name.lower(): blueprint.right}
19181918
if isinstance(blueprint, (exp.Tuple, exp.Array)):
1919-
return {e.left.name: e.right for e in blueprint.expressions}
1919+
return {e.left.name.lower(): e.right for e in blueprint.expressions}
19201920
if isinstance(blueprint, dict):
1921-
return blueprint
1921+
return {k.lower(): v for k, v in blueprint.items()}
19221922

19231923
raise_config_error(
19241924
f"Expected a key-value mapping for the blueprint value, got '{blueprint}' instead",

0 commit comments

Comments
 (0)