How apache/ossie works
Purpose and canonical contract
Apache Ossie defines a vendor-neutral semantic-model interchange format for BI, analytics, and AI tooling. The canonical contract is a JSON/YAML specification, with human-readable rules and machine-readable schemas:
• core-spec/spec.md
• core-spec/spec.yaml
• core-spec/osi-schema.json
Models describe shared business semantics rather than an application runtime.
Primary inputs and validation boundary
Ossie models are authored or generated as YAML/JSON, illustrated by:
• examples/flights.yaml
• examples/tpcds_semantic_model.yaml
Schema validation is a separate boundary: validation/validate.py validates model documents against the core schema. Converter implementations must preserve the canonical model where possible and surface unsupported/lossy mappings rather than silently changing semantics.
Reference model libraries
Python model definitions provide a reusable in-process representation for Python converters and consumers:
• python/src/ossie/models.py
• python/src/ossie/__init__.py
The ontology is a related semantic vocabulary/artifact, particularly relevant to ontology-aware mappings:
• ontology/ontology.json
• ontology/ontology.md
Converter architecture
converters/ contains independently packaged, language-specific adapters that translate between external vendor formats and the Ossie contract. The central control flow is:
external model/files/API payload → vendor parser and mapping logic → Ossie YAML/JSON model → validation/export; reverse conversion follows the inverse path.
Python converter entry points and bidirectional mapping modules include:
• converters/dbt/src/ossie_dbt/cli.py
• converters/dbt/src/ossie_dbt/msi_to_osi.py
• converters/dbt/src/ossie_dbt/osi_to_msi.py
• converters/omni/src/osi_omni/omni_to_osi.py
• converters/omni/src/osi_omni/osi_to_omni.py
Complex mapping and compatibility adapters
Some adapters add explicit domain layers beyond direct field translation. Orionbelt maps OBML and ontology concepts, validates source structures, and supports bidirectional conversion:
• converters/orionbelt/src/ossie_orionbelt/converter.py
• converters/orionbelt/src/ossie_orionbelt/ontology.py
• converters/orionbelt/src/ossie_orionbelt/validation.py
GoodData and Honeydew are smaller Python integration boundaries:
• converters/gooddata/src/ossie_gooddata/gooddata_to_osi.py
• converters/gooddata/src/ossie_gooddata/osi_to_gooddata.py
• converters/honeydew/src/honeydew_osi_converter.py
Java integrations and external-service boundary
Polaris is a Java/Maven adapter that parses/generates Ossie YAML and imports/exports through a Polaris client, making the remote Polaris platform an explicit infrastructure boundary:
• converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisClient.java
• converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisImporter.java
• converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisExporter.java
Salesforce uses a configurable Java conversion pipeline: direction configuration selects ordered mapping handlers, which transform datasets, fields, metrics, relationships, and semantic-model structures:
• converters/salesforce/src/main/java/org/apache/ossie/converter/ConverterImpl.java
• converters/salesforce/src/main/java/org/apache/ossie/converter/pipeline/PipelineConfigLoader.java
• converters/salesforce/src/main/resources/osi-salesforce-converter-config.yaml
Runtimes and extension model
The repository is primarily a specification plus reference adapters, not a unified deployable service. Python packages use pyproject.toml; Java integrations use Maven pom.xml. Adding a platform generally means implementing import/export mapping around the stable core-spec contract, with format-specific parsing, validation, and explicit handling of unsupported semantics.
Main entry points: spec.yaml Ossie YAML contract · validate.py Model validator · converter.py Orionbelt converter · PolarisImporter.java Polaris import/export
Components 21
Canonical contract
- Ossie specification · Human-readable semantic-model rules.
core-spec/spec.md - Ossie YAML contract · Machine-readable canonical model format.
core-spec/spec.yaml - Ossie JSON Schema
core-spec/osi-schema.json - Model validator · Validates model documents against the core schema.
validation/validate.py - Ossie ontology · Vocabulary used by ontology-aware mappings.
ontology/ontology.json
Python adapters
- Python model library · Reusable representation for Python converters and consumers.
python/src/ossie/models.py - dbt bidirectional mapping
converters/dbt/src/ossie_dbt/msi_to_osi.py - dbt export mapping
converters/dbt/src/ossie_dbt/osi_to_msi.py - Omni import mapping
converters/omni/src/osi_omni/omni_to_osi.py - Omni export mapping
converters/omni/src/osi_omni/osi_to_omni.py - Orionbelt converter · Maps OBML through explicit domain layers.
converters/orionbelt/src/ossie_orionbelt/converter.py - Orionbelt ontology mapping · Handles OBML and ontology concepts.
converters/orionbelt/src/ossie_orionbelt/ontology.py - Orionbelt source validation
converters/orionbelt/src/ossie_orionbelt/validation.py - GoodData mappings
converters/gooddata/src/ossie_gooddata/gooddata_to_osi.py - Honeydew converter
converters/honeydew/src/honeydew_osi_converter.py
Java adapters
- Polaris import/export · Parses and generates Ossie YAML for Polaris.
converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisImporter.java - Polaris client · Remote-platform integration boundary.
converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisClient.java - Salesforce mapping pipeline · Configured ordered handlers transform semantic-model structures.
converters/salesforce/src/main/java/org/apache/ossie/converter/ConverterImpl.java - Salesforce pipeline config · Selects direction-specific mapping handlers.
converters/salesforce/src/main/resources/osi-salesforce-converter-config.yaml
Other components
- External semantic models · Vendor models, files, or API payloads.
- Polaris platform
Connections 21
- Ossie specification → Ossie YAML contract: defines
- Ossie YAML contract → Ossie JSON Schema: formalized by
- External semantic models → Model validator: submit models
- Model validator → Ossie JSON Schema: validates against
- Python model library → Ossie YAML contract: represents
- dbt bidirectional mapping → Ossie YAML contract: imports to
- Ossie YAML contract → dbt export mapping: exports through
- Omni import mapping → Ossie YAML contract: imports to
- Ossie YAML contract → Omni export mapping: exports through
- Orionbelt source validation → Orionbelt converter: checks source
- Orionbelt ontology mapping → Orionbelt converter: supplies mappings
- Ossie ontology → Orionbelt ontology mapping: semantic vocabulary
- Orionbelt converter → Ossie YAML contract: bidirectional conversion
- GoodData mappings → Ossie YAML contract: bidirectional mapping
- Honeydew converter → Ossie YAML contract: bidirectional mapping
- Polaris import/export → Ossie YAML contract: parses / generates
- Polaris import/export → Polaris client: uses
- Polaris client → Polaris platform: imports / exports
- Salesforce pipeline config → Salesforce mapping pipeline: configures
- Salesforce mapping pipeline → Ossie YAML contract: bidirectional conversion
- Ossie YAML contract → Model validator: validate output