# apache/ossie architecture

> Architecture diagram of the GitHub repository apache/ossie, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/apache/ossie
- Repository: https://github.com/apache/ossie

## Overview

#### 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: [`core-spec/spec.yaml`](https://github.com/apache/ossie/blob/main/core-spec/spec.yaml) (Ossie YAML contract), [`validation/validate.py`](https://github.com/apache/ossie/blob/main/validation/validate.py) (Model validator), [`converters/orionbelt/src/ossie_orionbelt/converter.py`](https://github.com/apache/ossie/blob/main/converters/orionbelt/src/ossie_orionbelt/converter.py) (Orionbelt converter), [`converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisImporter.java`](https://github.com/apache/ossie/blob/main/converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisImporter.java) (Polaris import/export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_contract["Canonical contract"]
  node_core_spec["Ossie specification<br/>canonical contract<br/>[spec.md]"]
  node_core_format["Ossie YAML contract<br/>JSON / YAML spec<br/>[spec.yaml]"]
  node_core_schema["Ossie JSON Schema<br/>[osi-schema.json]"]
  node_validator["Model validator<br/>Python validation<br/>[validate.py]"]
  node_ontology["Ossie ontology<br/>semantic vocabulary<br/>[ontology.json]"]
end

subgraph group_python["Python adapters"]
  node_python_models["Python model library<br/>in-process models<br/>[models.py]"]
  node_dbt_adapter["dbt bidirectional mapping<br/>Python converter<br/>[msi_to_osi.py]"]
  node_dbt_export["dbt export mapping<br/>Python converter<br/>[osi_to_msi.py]"]
  node_omni_adapter["Omni import mapping<br/>Python converter<br/>[omni_to_osi.py]"]
  node_omni_export["Omni export mapping<br/>Python converter<br/>[osi_to_omni.py]"]
  node_orionbelt_converter["Orionbelt converter<br/>Python converter<br/>[converter.py]"]
  node_orionbelt_domain["Orionbelt ontology mapping<br/>compatibility layer<br/>[ontology.py]"]
  node_orionbelt_validation["Orionbelt source validation<br/>[validation.py]"]
  node_gooddata_adapter["GoodData mappings<br/>Python converter<br/>[gooddata_to_osi.py]"]
  node_honeydew_adapter["Honeydew converter<br/>Python converter"]
end

subgraph group_java["Java adapters"]
  node_polaris_io["Polaris import/export<br/>Java adapter"]
  node_polaris_client["Polaris client<br/>Java API client<br/>[PolarisClient.java]"]
  node_salesforce_pipeline["Salesforce mapping pipeline<br/>Java conversion pipeline<br/>[ConverterImpl.java]"]
  node_salesforce_config["Salesforce pipeline config<br/>pipeline configuration"]
end

node_authors["External semantic models<br/>YAML / JSON inputs"]
node_polaris_platform(("Polaris platform<br/>external service"))

node_core_spec -->|"defines"| node_core_format
node_core_format -->|"formalized by"| node_core_schema
node_authors -->|"submit models"| node_validator
node_validator -->|"validates against"| node_core_schema
node_python_models -->|"represents"| node_core_format
node_dbt_adapter -->|"imports to"| node_core_format
node_core_format -->|"exports through"| node_dbt_export
node_omni_adapter -->|"imports to"| node_core_format
node_core_format -->|"exports through"| node_omni_export
node_orionbelt_validation -->|"checks source"| node_orionbelt_converter
node_orionbelt_domain -->|"supplies mappings"| node_orionbelt_converter
node_ontology -->|"semantic vocabulary"| node_orionbelt_domain
node_orionbelt_converter -->|"bidirectional conversion"| node_core_format
node_gooddata_adapter -->|"bidirectional mapping"| node_core_format
node_honeydew_adapter -->|"bidirectional mapping"| node_core_format
node_polaris_io -->|"parses / generates"| node_core_format
node_polaris_io -->|"uses"| node_polaris_client
node_polaris_client -->|"imports / exports"| node_polaris_platform
node_salesforce_config -->|"configures"| node_salesforce_pipeline
node_salesforce_pipeline -->|"bidirectional conversion"| node_core_format
node_core_format -.->|"validate output"| node_validator

click node_core_spec "https://github.com/apache/ossie/blob/main/core-spec/spec.md"
click node_core_format "https://github.com/apache/ossie/blob/main/core-spec/spec.yaml"
click node_core_schema "https://github.com/apache/ossie/blob/main/core-spec/osi-schema.json"
click node_validator "https://github.com/apache/ossie/blob/main/validation/validate.py"
click node_python_models "https://github.com/apache/ossie/blob/main/python/src/ossie/models.py"
click node_ontology "https://github.com/apache/ossie/blob/main/ontology/ontology.json"
click node_dbt_adapter "https://github.com/apache/ossie/blob/main/converters/dbt/src/ossie_dbt/msi_to_osi.py"
click node_dbt_export "https://github.com/apache/ossie/blob/main/converters/dbt/src/ossie_dbt/osi_to_msi.py"
click node_omni_adapter "https://github.com/apache/ossie/blob/main/converters/omni/src/osi_omni/omni_to_osi.py"
click node_omni_export "https://github.com/apache/ossie/blob/main/converters/omni/src/osi_omni/osi_to_omni.py"
click node_orionbelt_converter "https://github.com/apache/ossie/blob/main/converters/orionbelt/src/ossie_orionbelt/converter.py"
click node_orionbelt_domain "https://github.com/apache/ossie/blob/main/converters/orionbelt/src/ossie_orionbelt/ontology.py"
click node_orionbelt_validation "https://github.com/apache/ossie/blob/main/converters/orionbelt/src/ossie_orionbelt/validation.py"
click node_gooddata_adapter "https://github.com/apache/ossie/blob/main/converters/gooddata/src/ossie_gooddata/gooddata_to_osi.py"
click node_honeydew_adapter "https://github.com/apache/ossie/blob/main/converters/honeydew/src/honeydew_osi_converter.py"
click node_polaris_io "https://github.com/apache/ossie/blob/main/converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisImporter.java"
click node_polaris_client "https://github.com/apache/ossie/blob/main/converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisClient.java"
click node_salesforce_pipeline "https://github.com/apache/ossie/blob/main/converters/salesforce/src/main/java/org/apache/ossie/converter/ConverterImpl.java"
click node_salesforce_config "https://github.com/apache/ossie/blob/main/converters/salesforce/src/main/resources/osi-salesforce-converter-config.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_core_spec,node_core_format,node_core_schema,node_validator,node_ontology toneBlue
class node_python_models,node_dbt_adapter,node_dbt_export,node_omni_adapter,node_omni_export,node_orionbelt_converter,node_orionbelt_domain,node_orionbelt_validation,node_gooddata_adapter,node_honeydew_adapter toneAmber
class node_polaris_io,node_polaris_client,node_salesforce_pipeline,node_salesforce_config toneMint
class node_authors,node_polaris_platform toneNeutral
```

## Components

### Canonical contract

- [Ossie specification](https://github.com/apache/ossie/blob/main/core-spec/spec.md): canonical contract · Human-readable semantic-model rules. · `core-spec/spec.md`
- [Ossie YAML contract](https://github.com/apache/ossie/blob/main/core-spec/spec.yaml): JSON / YAML spec · Machine-readable canonical model format. · `core-spec/spec.yaml`
- [Ossie JSON Schema](https://github.com/apache/ossie/blob/main/core-spec/osi-schema.json): schema · `core-spec/osi-schema.json`
- [Model validator](https://github.com/apache/ossie/blob/main/validation/validate.py): Python validation · Validates model documents against the core schema. · `validation/validate.py`
- [Ossie ontology](https://github.com/apache/ossie/blob/main/ontology/ontology.json): semantic vocabulary · Vocabulary used by ontology-aware mappings. · `ontology/ontology.json`

### Python adapters

- [Python model library](https://github.com/apache/ossie/blob/main/python/src/ossie/models.py): in-process models · Reusable representation for Python converters and consumers. · `python/src/ossie/models.py`
- [dbt bidirectional mapping](https://github.com/apache/ossie/blob/main/converters/dbt/src/ossie_dbt/msi_to_osi.py): Python converter · `converters/dbt/src/ossie_dbt/msi_to_osi.py`
- [dbt export mapping](https://github.com/apache/ossie/blob/main/converters/dbt/src/ossie_dbt/osi_to_msi.py): Python converter · `converters/dbt/src/ossie_dbt/osi_to_msi.py`
- [Omni import mapping](https://github.com/apache/ossie/blob/main/converters/omni/src/osi_omni/omni_to_osi.py): Python converter · `converters/omni/src/osi_omni/omni_to_osi.py`
- [Omni export mapping](https://github.com/apache/ossie/blob/main/converters/omni/src/osi_omni/osi_to_omni.py): Python converter · `converters/omni/src/osi_omni/osi_to_omni.py`
- [Orionbelt converter](https://github.com/apache/ossie/blob/main/converters/orionbelt/src/ossie_orionbelt/converter.py): Python converter · Maps OBML through explicit domain layers. · `converters/orionbelt/src/ossie_orionbelt/converter.py`
- [Orionbelt ontology mapping](https://github.com/apache/ossie/blob/main/converters/orionbelt/src/ossie_orionbelt/ontology.py): compatibility layer · Handles OBML and ontology concepts. · `converters/orionbelt/src/ossie_orionbelt/ontology.py`
- [Orionbelt source validation](https://github.com/apache/ossie/blob/main/converters/orionbelt/src/ossie_orionbelt/validation.py): source validation · `converters/orionbelt/src/ossie_orionbelt/validation.py`
- [GoodData mappings](https://github.com/apache/ossie/blob/main/converters/gooddata/src/ossie_gooddata/gooddata_to_osi.py): Python converter · `converters/gooddata/src/ossie_gooddata/gooddata_to_osi.py`
- [Honeydew converter](https://github.com/apache/ossie/blob/main/converters/honeydew/src/honeydew_osi_converter.py): Python converter · `converters/honeydew/src/honeydew_osi_converter.py`

### Java adapters

- [Polaris import/export](https://github.com/apache/ossie/blob/main/converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisImporter.java): Java adapter · Parses and generates Ossie YAML for Polaris. · `converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisImporter.java`
- [Polaris client](https://github.com/apache/ossie/blob/main/converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisClient.java): Java API client · Remote-platform integration boundary. · `converters/polaris/src/main/java/org/apache/ossie/converter/polaris/PolarisClient.java`
- [Salesforce mapping pipeline](https://github.com/apache/ossie/blob/main/converters/salesforce/src/main/java/org/apache/ossie/converter/ConverterImpl.java): Java conversion pipeline · Configured ordered handlers transform semantic-model structures. · `converters/salesforce/src/main/java/org/apache/ossie/converter/ConverterImpl.java`
- [Salesforce pipeline config](https://github.com/apache/ossie/blob/main/converters/salesforce/src/main/resources/osi-salesforce-converter-config.yaml): pipeline configuration · Selects direction-specific mapping handlers. · `converters/salesforce/src/main/resources/osi-salesforce-converter-config.yaml`

### Other components

- **External semantic models**: YAML / JSON inputs · Vendor models, files, or API payloads.
- **Polaris platform**: external service

## Connections

- 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
