Add BIGQUERY and MAQL to OSIDialect - #2095
Open
ota2000 wants to merge 1 commit into
Open
Conversation
The OSI core spec dialect enum includes MAQL and BIGQUERY; OSI documents using those dialects currently fail pydantic validation. Adding the members is enough to unblock them: _get_expression already falls back to the first available dialect when the preferred one is absent.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates MetricFlow’s OSI conversion models to align OSIDialect with the OSI core spec so OSI documents containing BIGQUERY / MAQL dialect expressions pass Pydantic validation (avoiding dbt parse failures with dbt-core’s native OSI parsing).
Changes:
- Add
MAQLandBIGQUERYmembers to theOSIDialectenum. - Add a
changieentry documenting the user-visible compatibility improvement.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
metricflow/converters/models.py |
Extends OSIDialect to include MAQL and BIGQUERY for OSI schema compatibility. |
.changes/unreleased/Features-20260723-130000.yaml |
Records the change in the unreleased changelog. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2094
Description
The OSI core spec dialect enum is
["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS", "MAQL", "BIGQUERY"](apache/ossiecore-spec/osi-schema.json).OSIDialectonly has the first five, so OSI documents carryingBIGQUERY/MAQLexpressions fail pydantic validation — with dbt-core 1.12 native OSI parsing that is a harddbt parsefailure.Adding the two members is sufficient to unblock those documents:
_get_expressionalready falls back to the first available dialect when the preferred one is absent, so e.g. a BigQuery-only expression is picked up under the defaultANSI_SQLpreference.Verification
tests_metricflow_semantic_interfaces/osi/: 94 passedChecklist