Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
1dfc48f
Add Apache Ossie <-> Cube converter (import direction)
MikeNitsenko Jul 29, 2026
9265b9e
Add the Ossie -> Cube export direction, completing the converter
MikeNitsenko Jul 29, 2026
f6ed9c8
Close the test gaps coverage exposed; drop two dead code paths
MikeNitsenko Jul 29, 2026
5ebf085
Explain a view-only input, accept a single file, and test the CLI
MikeNitsenko Jul 29, 2026
5aba963
tests: add more edge cases
MikeNitsenko Jul 29, 2026
c25bbe5
Accept several input paths on import, not just one root
MikeNitsenko Jul 29, 2026
479e85c
Register CUBE in the converters supported-vendors table
MikeNitsenko Jul 29, 2026
0f026a7
Add Ossie-side test fixtures and snapshot both directions
MikeNitsenko Jul 30, 2026
8e31d23
Resolve dimension names once; make the Hypothesis driver honour p
MikeNitsenko Jul 30, 2026
e7696e6
Inline a split geo dimension's SQL where its halves are referenced
MikeNitsenko Jul 30, 2026
7ac3466
Use a deque for the generated view's BFS; fix a licence/license typo
MikeNitsenko Jul 30, 2026
57bad84
Refuse rather than drop unparkable extensions; separate drops from parks
MikeNitsenko Jul 30, 2026
43de2ab
Assemble geo dimensions by name, not by a mid-loop list index
MikeNitsenko Jul 30, 2026
9891ba6
Correct every mislabelled issue type, not just the flagged one
MikeNitsenko Jul 30, 2026
2d7055e
Fix five round-trip bugs found in review
MikeNitsenko Jul 30, 2026
f0bb1a4
Keep every view when several share one YAML file
MikeNitsenko Jul 30, 2026
c77ab09
Mark a Cube primary key only on a dimension that actually is that column
MikeNitsenko Jul 30, 2026
1a4a4b9
Stop stashing what is not Cube-specific (first pass)
MikeNitsenko Aug 3, 2026
04d2988
Map datatypes natively and narrow member references
MikeNitsenko Aug 3, 2026
2b8d615
Report a source that other Ossie converters will reject
MikeNitsenko Aug 3, 2026
0501e0b
Split a composite metric into one measure per aggregate
MikeNitsenko Aug 3, 2026
a4f4073
Convert a fan-out-unsafe metric and report it, rather than refusing
MikeNitsenko Aug 3, 2026
047e76e
Add the interop matrix the README's claims are measured with
MikeNitsenko Aug 3, 2026
e5e7a80
Fix two expression-handling defects found in review
MikeNitsenko Aug 3, 2026
bf0cbb9
Clean up the review findings that were not behaviour
MikeNitsenko Aug 3, 2026
6cc4c31
Fix eleven defects found in review, four of them silent
MikeNitsenko Aug 4, 2026
b5fdaed
Add a Cube-compiles-it gate, spec validation everywhere, and a featur…
MikeNitsenko Aug 4, 2026
c2f40d8
Fix five more review findings; the sixth was not a defect
MikeNitsenko Aug 4, 2026
88c9ee8
Fix five more review findings, two of them silently wrong SQL
MikeNitsenko Aug 4, 2026
d267355
Fix five more review findings, one of them a real fan-out hole
MikeNitsenko Aug 4, 2026
771f6b6
Generate from both ends; the new direction found a defect immediately
MikeNitsenko Aug 4, 2026
9ff965b
Fix seven more review findings, plus two found while verifying them
MikeNitsenko Aug 4, 2026
39d063f
Fix six more review findings; two were regressions in last round's fixes
MikeNitsenko Aug 4, 2026
c63e4fb
Refactor: delete dead code, collapse the seven per-cube fact maps int…
MikeNitsenko Aug 4, 2026
cac3bce
Refactor: one notion of identifier matching, tables prepared once
MikeNitsenko Aug 4, 2026
299b873
Fix four more review findings in aggregate analysis and geo references
MikeNitsenko Aug 4, 2026
14c8f5d
Compare metric names case-insensitively; DISTINCT in unmodelled calls
MikeNitsenko Aug 4, 2026
97a59fb
Make another converter's output usable: dialect fallback and unique_k…
MikeNitsenko Aug 4, 2026
501721a
Emit the dimension role block on every dimension
MikeNitsenko Aug 4, 2026
e9384da
Record provenance for the three Cube-shaped choices export has to make
MikeNitsenko Aug 4, 2026
23a2341
Generate the shapes the last three blockers lived in
MikeNitsenko Aug 4, 2026
f4a12a7
Preserve key columns and every dialect of an expression
MikeNitsenko Aug 4, 2026
7c548d0
Keep the second export cycle identical to the first
MikeNitsenko Aug 4, 2026
a9f3350
Emit a view that cannot collide with a cube
MikeNitsenko Aug 5, 2026
6a31afd
Preserve the model name whenever the view cannot carry it
MikeNitsenko Aug 5, 2026
13cdb5b
Carry model metadata on a cube when no view can hold it
MikeNitsenko Aug 5, 2026
a1f3f2f
Derive a measure's structure from its expression, not the stash
MikeNitsenko Aug 6, 2026
b4243d8
Keep measure references as metric references instead of inlining
MikeNitsenko Aug 6, 2026
4bf6528
Qualify raw columns in generated Cube SQL as {CUBE} references
MikeNitsenko Aug 6, 2026
07fbc22
Attribute an unqualified column to the dataset that declares it
MikeNitsenko Aug 6, 2026
3d0ff89
A composite measure travels with no extension at all
MikeNitsenko Aug 6, 2026
f8db1e9
Park a sub_query dimension whole instead of emitting a broken field
MikeNitsenko Aug 6, 2026
f635710
Audit pass: pin two namespace edges, retire stale prose
MikeNitsenko Aug 6, 2026
c380119
Do not stash the view export generated: predict it and skip
MikeNitsenko Aug 6, 2026
78b721d
Address Cube converter review edge cases
MikeNitsenko Aug 25, 2026
a00c933
Count a parked join when deciding what fans out
MikeNitsenko Sep 14, 2026
6e6217d
Qualify glue-text columns against the whole expression
MikeNitsenko Sep 14, 2026
6520a0c
Share aggregate detection between decomposition and fan-out
MikeNitsenko Sep 14, 2026
8fa5cbd
Park an aggregate over a measure instead of inventing a column
MikeNitsenko Sep 14, 2026
5c9b563
Point the spec validation at the schema's current name
MikeNitsenko Sep 14, 2026
f4b7acc
Review pass: stop inferring a column from a bare token
MikeNitsenko Sep 14, 2026
a5a6989
Refuse a measure reference in an aggregate's filters too
MikeNitsenko Sep 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/converter-cube-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: Converters Cube CI

on:
push:
branches: [ "main" ]
paths:
- 'converters/cube/**'
- '.github/workflows/converter-cube-ci.yml'
pull_request:
branches: [ "main" ]
paths:
- 'converters/cube/**'
- '.github/workflows/converter-cube-ci.yml'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout project
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"

- name: Sync dependencies
working-directory: converters/cube
run: |
uv sync

- name: Unit Tests
working-directory: converters/cube
# The Cube-compiles-it gate needs a built Cube checkout (OSSIE_CUBE_REPO) and
# skips without one, so CI runs everything else. See converters/cube/README.md.
run: |
uv run pytest
1 change: 1 addition & 0 deletions converters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ The Ossie specification currently defines extensions for the following vendors:
| `WISDOM` | WisdomAI domain |
| `NVIDIA_GSF` | NVIDIA Generative Semantic Fabric standalone YAML |
| `SIGMA` | Sigma Computing data model |
| `CUBE` | Cube data model |

Each vendor may define custom extensions (via the `custom_extensions` field in the Ossie spec) to carry vendor-specific metadata that does not have an equivalent in the core specification.

Expand Down
561 changes: 561 additions & 0 deletions converters/cube/README.md

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions converters/cube/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "apache-ossie-cube"
version = "0.2.0.dev0"
description = "Bidirectional converter between Apache Ossie semantic models and Cube data models"
authors = [{ name = "Apache Software Foundation", email = "dev@ossie.apache.org" }]
requires-python = ">=3.11"
readme = "README.md"
license = "Apache-2.0"
keywords = [
"Apache Ossie",
"Ossie",
"Cube",
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
]
dependencies = [
"PyYAML>=6.0",
# Expression handling: locating the aggregate calls inside a composite metric so
# each can become its own Cube measure. Already a runtime dependency of the dbt
# and NVIDIA GSF converters, which use it for the same purpose.
"sqlglot>=20.0",
]

[dependency-groups]
dev = [
"pytest>=8.0",
"hypothesis>=6.0",
# So the core-spec schema validation in test_roundtrip.py runs rather than
# skipping; the converter itself needs neither.
"jsonschema>=4.0",
]

[project.scripts]
ossie-cube = "ossie_cube.cli:main"

[project.urls]
homepage = "https://ossie.apache.org/"
repository = "https://github.com/apache/ossie/"

[tool.hatch.build.targets.wheel]
packages = ["src/ossie_cube"]

[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]

[tool.uv]
required-version = ">=0.9.0"
default-groups = [
"dev",
]
40 changes: 40 additions & 0 deletions converters/cube/src/ossie_cube/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

"""Bidirectional converter between Apache Ossie semantic models and Cube data
models. Pure offline transforms: Ossie YAML string <-> {relative filename: YAML
string}.

from ossie_cube import convert_cube_to_ossie, convert_ossie_to_cube

ossie_yaml, issues = convert_cube_to_ossie(files)
files, issues = convert_ossie_to_cube(ossie_yaml)
"""

from ._common import ConversionError
from .converter_issues import ConverterIssue, IssueLog, IssueType
from .cube_to_osi import convert_cube_to_ossie
from .osi_to_cube import convert_ossie_to_cube

__all__ = [
"ConversionError",
"ConverterIssue",
"IssueLog",
"IssueType",
"convert_cube_to_ossie",
"convert_ossie_to_cube",
]
Loading