Skip to content

Add OrionBelt (OBML) converter#153

Open
ralfbecher wants to merge 1 commit into
open-semantic-interchange:mainfrom
ralfbecher:converter/orionbelt
Open

Add OrionBelt (OBML) converter#153
ralfbecher wants to merge 1 commit into
open-semantic-interchange:mainfrom
ralfbecher:converter/orionbelt

Conversation

@ralfbecher

Copy link
Copy Markdown
Contributor

Summary

Adds a bidirectional converter between OSI and OrionBelt's OBML (OrionBelt Markup Language) under converters/orionbelt/, following the hub-and-spoke guidance in converters/index.md.

  • OBML to OSI: maps datasets, fields, relationships, and metrics to the OSI core spec. OrionBelt-proprietary constructs (OBML-only filters, settings, owner, refresh, type info, named secondary join paths, many-to-many cardinality) are emitted under the ORIONBELT vendor in custom_extensions so nothing is dropped.
  • OSI to OBML: restores OSI-native fields that OBML can't represent (unique keys, field labels, leftover ai_context) via an OSI vendor stash, so a full OSI to OBML to OSI roundtrip is lossless. Third-party vendor extensions (SNOWFLAKE, DBT, SALESFORCE, GOODDATA, ...) are preserved verbatim at every level.
  • Also supports the OSI ontology export direction.
  • ANSI_SQL dialect for field and metric expressions, with the documented fallback behaviour.

Layout

Mirrors the existing Python converters (gooddata, dbt):

  • src/osi_orionbelt/ (converter, CLI, vendored OSI/OBML/ontology JSON schemas for self-contained builds)
  • tests/ with 120 tests, including a TPC-DS baseline against examples/tpcds_semantic_model.yaml (byte-identical fixture)
  • pyproject.toml, README.md, and OBML <-> OSI mapping analysis docs
cd converters/orionbelt
uv sync && uv run pytest   # 120 passed

CLI (osi-orionbelt) exposes obml-to-osi and osi-to-obml subcommands, mirroring osi-dbt.

Spec impact

None. vendor_name is free-form in the core spec, so the ORIONBELT vendor tag needs no schema or specification change. This is a converter-only (non-spec) contribution.

Notes

The canonical converter source is maintained in the orionbelt-semantic-layer repository (packages/osi-orionbelt) and published to PyPI as osi-orionbelt (Apache-2.0). Documented limitations (many-to-many joins, named secondary join paths, ontology-layer value concepts) are carried losslessly in custom_extensions and listed in the README.

Add a bidirectional converter between the OSI semantic model format and
OrionBelt's OBML (OrionBelt Markup Language) under converters/orionbelt/.

- OBML -> OSI: emits OrionBelt-proprietary constructs under the ORIONBELT
  vendor custom_extensions; preserves third-party vendor extensions verbatim.
- OSI -> OBML: restores OSI-native fields stashed under the OSI vendor on a
  full roundtrip; carries unrepresentable OBML topology without loss.
- Also supports the OSI ontology export direction.
- CLI (osi-orionbelt) with obml-to-osi / osi-to-obml subcommands, mirroring
  osi-dbt.
- Self-contained: vendors the OSI, OBML, and OSI-ontology JSON schemas.
- 120 tests, including a TPC-DS baseline against examples/tpcds_semantic_model.yaml.

vendor_name is free-form in the core spec, so no specification change is
required for the ORIONBELT vendor tag.

Register the converter in ROADMAP.md alongside the other reference converters.
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.

1 participant