Skip to content

Fix!: normalize blueprint variables#5045

Merged
georgesittas merged 3 commits intomainfrom
jo/normalize_blueprint_names
Jul 31, 2025
Merged

Fix!: normalize blueprint variables#5045
georgesittas merged 3 commits intomainfrom
jo/normalize_blueprint_names

Conversation

@georgesittas
Copy link
Contributor

The following model fails to load today, because blueprint variables are not normalized:

MODEL (
  name test_schema.test_model,
  kind FULL,
  blueprints (
    (Test_Var := 1)
  )
);

SELECT
  @test_var AS col

This PR aims to address this issue. I also added a migration script that normalizes all existing blueprint
variable keys in the python_env, unless there are keys that collide when normalized. In that case, we
raise an AssertionError to avoid messing up the state. This allows the user to rename their blueprint
variables in order to avoid this issue and then re-run the migration.

@georgesittas georgesittas requested a review from a team July 28, 2025 14:59
@georgesittas georgesittas requested a review from izeigerman July 29, 2025 14:32
@georgesittas georgesittas force-pushed the jo/normalize_blueprint_names branch 7 times, most recently from 92b56c1 to 6201a76 Compare July 31, 2025 13:19
@georgesittas georgesittas force-pushed the jo/normalize_blueprint_names branch from a9fc861 to 73433d0 Compare July 31, 2025 16:02
@georgesittas georgesittas merged commit 3bbb819 into main Jul 31, 2025
27 checks passed
@georgesittas georgesittas deleted the jo/normalize_blueprint_names branch July 31, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants