Skip to content

fix: pydantic v1 issues with dbt 1.6 semantic models#5255

Merged
eakmanrq merged 1 commit intomainfrom
eakmanrq/dbt_16_pydantic_v1_semantic
Aug 28, 2025
Merged

fix: pydantic v1 issues with dbt 1.6 semantic models#5255
eakmanrq merged 1 commit intomainfrom
eakmanrq/dbt_16_pydantic_v1_semantic

Conversation

@eakmanrq
Copy link
Collaborator

dbt 1.6 requires Pydantic v1 but this is just to support semantic models. Prior to this change, if a user is on 1.6 and has a semantic model they will get a Pydantic error trying to validate their semantic models since it expects v1 but we forced v2.

This PR disables Semantic Models for 1.6+. It does this by disabling the validation that happens on manifest load and then removes any loaded semantic models from the manifest. This ensures we don't interact with these objects going forward.

This PR could be adjusted to just remove semantic models for 1.6 and leave them for 1.7+ but I don't see why the SQLMesh adapter would care about semantic models so it seems better to remove them entirely.

@eakmanrq eakmanrq force-pushed the eakmanrq/dbt_16_pydantic_v1_semantic branch 6 times, most recently from 56b4a90 to a0e1dea Compare August 28, 2025 21:41
@eakmanrq eakmanrq force-pushed the eakmanrq/dbt_16_pydantic_v1_semantic branch from a0e1dea to 48a7384 Compare August 28, 2025 21:43
@eakmanrq eakmanrq enabled auto-merge (squash) August 28, 2025 21:46
@eakmanrq eakmanrq merged commit d53a58e into main Aug 28, 2025
36 checks passed
@eakmanrq eakmanrq deleted the eakmanrq/dbt_16_pydantic_v1_semantic branch August 28, 2025 21:59
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