tree: 8dd02608a44f2cd1a2c3251c06a554c6e597158e
  1. src/
  2. tests/
  3. pyproject.toml
  4. README.md
  5. uv.lock
converters/gooddata/README.md

GoodData Apache Ossie Converter

Bidirectional converter between GoodData's declarative Logical Data Model (LDM) and the Apache Ossie semantic model specification.

Features

  • GoodData → Ossie: Convert a GoodData declarative LDM JSON to Ossie semantic model YAML
  • Ossie → GoodData: Convert an Ossie semantic model YAML to GoodData declarative LDM JSON
  • Preserves GoodData-specific metadata (labels, date granularities, geo types) via Ossie custom_extensions
  • Generates dual-dialect expressions (ANSI_SQL + MAQL) for fields

Usage

import json
import yaml
from ossie_gooddata import gooddata_to_osi, osi_to_gooddata
from ossie_gooddata.models import gd_model_from_dict, gd_model_to_dict

# GoodData → Apache Ossie
with open("gooddata_ldm.json") as f:
    gd_model = gd_model_from_dict(json.load(f))
osi_model = gooddata_to_osi(gd_model, model_name="my_model")
with open("osi_model.yaml", "w") as f:
    yaml.dump(osi_model, f, default_flow_style=False)

# Apache Ossie → GoodData
with open("osi_model.yaml") as f:
    osi_data = yaml.safe_load(f)
gd_model = osi_to_gooddata(osi_data, data_source_id="my_datasource")
with open("gooddata_ldm.json", "w") as f:
    json.dump(gd_model_to_dict(gd_model), f, indent=2)

Development

uv sync --group dev
uv run pytest

Concept Mapping

GoodData LDMOssie Semantic Model
DatasetDataset
Attribute (+ Labels)Field with dimension metadata
FactField without dimension metadata
Reference (FK)Relationship
Date InstanceDataset with GOODDATA custom_extension (date_dimension: true)
MAQL expressionDialect entry (dialect: MAQL)

Limitations

  • Metrics are not converted. GoodData metrics use MAQL, a context-aware metric language where dimensionality and filters are applied at report time. The current Ossie metric model is SQL-expression-based and cannot represent this paradigm.
  • AggregatedFacts are not yet supported.
  • Workspace data filters are not mapped.