dbt-labs / dbt-labs/metricflow
OSIDialect enum is missing BIGQUERY and MAQL from the OSI core spec
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 202
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 14
Description
## OSIDialect enum lags the OSI core spec: `BIGQUERY` and `MAQL` are missing
The OSI core spec's dialect enum currently is:
```
["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS", "MAQL", "BIGQUERY"]
```
(apache/ossie `core-spec/osi-schema.json`, `BIGQUERY` added in open-semantic-interchange/OSI#143.)
`OSIDialect` in `metricflow/converters/models.py` only has the first five, so any OSI document that carries a `BIGQUERY` (or `MAQL`) dialect expression fails pydantic validation — with dbt-core 1.12's native OSI parsing this surfaces as a hard `Failed to parse OSI file` error at `dbt parse`. BigQuery users therefore have to author every expression under the `ANSI_SQL` dialect even when the SQL is BigQuery-specific.
### Suggested fix
Add the two missing members to `OSIDialect`. That alone unblocks the documents: validation passes, and since `_get_expression` falls back to the first available dialect when the preferred one is absent, a BigQuery-only expression is still picked up.
(Separately, dbt-core currently instantiates `OSIToMSIConverter()` with the default `ANSI_SQL` preference rather than the active adapter's dialect — worth a follow-up on the dbt side once the enum supports warehouse dialects, but out of scope here.)
Happy to open a PR for the enum addition.
Contributor guide
Assessment
This issue has not been assessed yet.