Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions compliance/portability/grader/test_grade.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _field(dataset, name, dialect, expression):


def _doc(metrics=None, datasets=None):
document = {"version": "0.2.0.dev0", "name": "t"}
document = {"version": "0.3.0.dev0", "name": "t"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, but no workflow runs anything under compliance/. validation-ci.yml and python-ci.yml do not list it in their paths, and neither runs the grader tests or validates the fixtures. So the green checks on this PR do not cover this file or the nine *.ossie.yaml fixtures. Locally, the 13 grader tests pass and all nine fixtures validate.

This matters more after the rename. #631 adds five more portability fixtures that declare 0.2.0.dev0, and #310 adds an ontology example that no CI step validates. Either one can merge green after this PR and leave a document on main that the schema rejects. Should we add compliance/** to the Validation CI paths, with steps that run the grader tests and validate the fixtures? A follow-up PR is fine too.

if metrics is not None:
document["metrics"] = metrics
if datasets is not None:
Expand Down Expand Up @@ -123,7 +123,7 @@ def test_dropped_diagnosed_when_warning_names_it():

def test_rejected_when_output_has_no_elements():
src = _doc(metrics=[_metric("total", "ANSI_SQL", "SUM(sales.amount)")])
report = grade.grade(src, {"version": "0.2.0.dev0", "name": "t"})
report = grade.grade(src, {"version": "0.3.0.dev0", "name": "t"})
assert report.rejected is True
assert _only(report).outcome == grade.REJECTED

Expand Down
2 changes: 1 addition & 1 deletion compliance/portability/m0/m0_ansi_qualified.ossie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# The qualified form is carried as primary at every rung per the open #486
# (qualified dataset.field only) decision; the bare form is a sibling variant
# (see m0_sum_bare.ossie.yaml) pending #343.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: m0_sales
description: M0 baseline -- single dataset, single field, single SUM metric.
datasets:
Expand Down
2 changes: 1 addition & 1 deletion compliance/portability/m0/m0_ossiesql_qualified.ossie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# honeydew, orionbelt returned it tagged ANSI_SQL with the text unchanged;
# only cube kept the OSSIE_SQL_2026 tag). "tag preserved" is tracked as a
# sub-metric under PORTABLE so that 1-of-N signal survives.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: m0_sales
description: M0 baseline -- single dataset, single field, single SUM metric.
datasets:
Expand Down
2 changes: 1 addition & 1 deletion compliance/portability/m0/m0_sum_bare.ossie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# and #486 (qualified dataset.field only) are still settling which form is the
# model-level reference. sigma drops this as a cross-dataset metric on a
# one-dataset model.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: m0_sales
description: M0 baseline -- single dataset, single field, single SUM metric.
datasets:
Expand Down
2 changes: 1 addition & 1 deletion compliance/portability/m1/m1_scalar_field.ossie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# it references the sibling column bare (amount). The qualified/bare axis that
# #486 and #343 settle applies to metric references, not to intra-dataset field
# expressions, so this rung has a single fixture.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: m1_sales
description: "M1: single dataset, one scalar calculated-column field expression."
datasets:
Expand Down
2 changes: 1 addition & 1 deletion compliance/portability/m2/m2_aggregates_bare.ossie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# M2 ladder rung: the core aggregate set as metrics. Variant: BARE reference
# form (column name only), kept as a sibling variant pending #343.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: m2_sales
description: "M2: core aggregate set, bare reference form."
datasets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# M2 ladder rung: the core aggregate set as metrics (SUM, COUNT,
# COUNT DISTINCT, AVG, MIN, MAX). Variant: QUALIFIED reference form
# (dataset.field), carried as primary per #486.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: m2_sales
description: "M2: core aggregate set, qualified reference form."
datasets:
Expand Down
2 changes: 1 addition & 1 deletion compliance/portability/m3/m3_filtered_agg_bare.ossie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# M3 ladder rung: a filtered aggregate in the spec's portable form
# SUM(CASE WHEN ... THEN x ELSE 0 END). Variant: BARE reference form, kept as a
# sibling variant pending #343.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: m3_sales
description: "M3: conditional aggregation, bare reference form."
datasets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# M3 ladder rung: a filtered aggregate in the spec's portable form
# SUM(CASE WHEN ... THEN x ELSE 0 END). Variant: QUALIFIED reference form,
# carried as primary per #486.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: m3_sales
description: "M3: conditional aggregation, qualified reference form."
datasets:
Expand Down
2 changes: 1 addition & 1 deletion compliance/query/scott/scott_model.ossie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# An Ossie relationship cannot express it, so a case that uses it writes the
# join in the query (Section 11.3).

version: 0.2.0.dev0
version: 0.3.0.dev0
name: scott_model
description: The SCOTT schema with dataset-scoped metrics
datasets:
Expand Down
2 changes: 1 addition & 1 deletion core-spec/ossie-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"properties": {
"version": {
"type": "string",
"const": "0.2.0.dev0",
"const": "0.3.0.dev0",
"description": "Apache Ossie specification version"
},
"name": {
Expand Down
4 changes: 2 additions & 2 deletions core-spec/relational_semantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
**Specification (draft)**

Status: Draft for the Ossie Semantics Working Group.
Target: Apache Ossie (Open Semantic Interchange) semantic-model spec version `0.2.0.dev0`.
Target: Apache Ossie (Open Semantic Interchange) semantic-model spec version `0.3.0.dev0`.
Scope: how a semantic layer exposes an Ossie model to SQL-native BI and AI tools as a set of
related SQL relations, and the semantics and correctness guarantees of querying the measures on
those relations through SQL.
Expand Down Expand Up @@ -1229,7 +1229,7 @@ join path, would leave to inference:
Apache Ossie terms (Section 3.4):

- **Apache Ossie (Open Semantic Interchange).** The vendor-neutral semantic-model standard this
interface exposes; model spec version `0.2.0.dev0`.
interface exposes; model spec version `0.3.0.dev0`.
- **Dataset (Ossie).** A logical table (fact or dimension) in an Ossie model; exposed here as a
*relation*.
- **Field (Ossie).** A scalar column of a dataset; our *field* (Ossie's term, adopted).
Expand Down
19 changes: 10 additions & 9 deletions core-spec/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

# Apache Ossie - Core Metadata Specification

> **DRAFT version** — in development, schema may change before 0.2.0 is released.
> **DRAFT version** — in development, schema may change before 0.3.0 is released.

**Version:** 0.2.0.dev0
**Version:** 0.3.0.dev0

## Goals

Expand Down Expand Up @@ -96,7 +96,7 @@ not define a bundle format or cross-model references.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `version` | string | Yes | Apache Ossie specification version (`0.2.0.dev0`) |
| `version` | string | Yes | Apache Ossie specification version (`0.3.0.dev0`) |
| `name` | string | Yes | Unique identifier for the semantic model |
| `description` | string | No | Human-readable description |
| `ai_context` | string/object | No | Additional context for AI tools (e.g., custom instructions) |
Expand All @@ -108,7 +108,7 @@ not define a bundle format or cross-model references.
### Example

```yaml
version: 0.2.0.dev0
version: 0.3.0.dev0
name: sales_analytics
description: Sales and customer analytics model
ai_context:
Expand All @@ -127,7 +127,7 @@ The same document structure in JSON:

```json
{
"version": "0.2.0.dev0",
"version": "0.3.0.dev0",
"name": "sales_analytics",
"datasets": [
{"name": "orders", "source": "sales.public.orders"}
Expand All @@ -137,13 +137,13 @@ The same document structure in JSON:

### Migrating earlier document shapes

This is a breaking change in the unreleased `0.2.0.dev0` specification. Earlier
This is a breaking change in the unreleased `0.3.0.dev0` specification. Earlier

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the break is still in the 0.2.0.dev0 snapshot. 0.3.0.dev0 should always have the flattening applied.

(non-blocking side note: perhaps these kinds of migration notes should in a separate file rather than the core -spec. the core spec just states the current state w/o reflecting on the past)

releases and earlier development snapshots use a `semantic_model` array. The
current schema accepts only the flat document shape; it does not accept the array
or an object-valued wrapper.

To migrate a document containing one model, move that model's properties to the
root and remove `semantic_model`. Use `version: 0.2.0.dev0` for the migrated
root and remove `semantic_model`. Use `version: 0.3.0.dev0` for the migrated
document. Remove any root-level `dialects` and `vendors` declarations; preserve
per-expression dialects and vendor information in `custom_extensions`. For
multiple models, create one document per model and validate each result. An empty
Expand Down Expand Up @@ -671,7 +671,7 @@ Future versions may add these.
Here's a complete semantic model example showing all components working together:

```yaml
version: 0.2.0.dev0
version: 0.3.0.dev0
name: ecommerce_analytics
description: E-commerce sales and customer analytics
ai_context:
Expand Down Expand Up @@ -799,7 +799,8 @@ ai_context:

## Version History

- **0.2.0.dev0** (Unreleased): In-development next minor release. Schema is mutable; do not depend on this version in production.
- **0.3.0.dev0** (Unreleased): In-development next minor release. Schema is mutable; do not depend on this version in production.
- Replaces `0.2.0.dev0`: there is no 0.2.0 release. Documents that declare `version: 0.2.0.dev0` must declare `0.3.0.dev0`.
- Breaking: each standalone document contains one model directly at the root; the `semantic_model` array is removed.
- Breaking: metric expressions, `primary_key`, `unique_keys`, and relationship `from_columns`/`to_columns` refer to dataset fields, not columns of the dataset's `source`. Model-scoped metric expressions must use qualified `dataset.field` references; dataset-scoped metric expressions use unqualified field names. Earlier versions did not specify this, and some converters read these names as source columns; those converters must now resolve them as fields. See [Name Resolution](#name-resolution).
- **0.1.1** (2025-12-11): Initial release
Expand Down
4 changes: 2 additions & 2 deletions core-spec/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# under the License.

# Apache Ossie - Core Metadata Spec (YAML Schema)
# DRAFT version - in development, schema may change before 0.2.0 is released
version: 0.2.0.dev0
# DRAFT version - in development, schema may change before 0.3.0 is released
version: 0.3.0.dev0
#
# Goals:
# - Standardization: Establish uniform language and structure for semantic model definitions
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Ossie addresses semantic fragmentation by providing:

### Specification at a Glance

The Ossie core specification (current version: **0.2.0.dev0**, latest released: **0.1.1**) defines a JSON/YAML format with one semantic model per document. Model properties such as `name` and `datasets` sit directly at the root alongside `version`, without a `semantic_model` wrapper. See the [migration guidance](../core-spec/spec.md#migrating-earlier-document-shapes). The key constructs are:
The Ossie core specification (current version: **0.3.0.dev0**, latest released: **0.1.1**) defines a JSON/YAML format with one semantic model per document. Model properties such as `name` and `datasets` sit directly at the root alongside `version`, without a `semantic_model` wrapper. See the [migration guidance](../core-spec/spec.md#migrating-earlier-document-shapes). The key constructs are:

| Construct | Description |
|-----------|-------------|
Expand Down
2 changes: 1 addition & 1 deletion examples/flights.mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

version: 0.2.0.dev0
version: 0.3.0.dev0
name: flights_mapping
description: Maps the Flights ontology onto the Flights semantic model
ontology_ref:
Expand Down
2 changes: 1 addition & 1 deletion examples/flights.ontology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

version: 0.2.0.dev0
version: 0.3.0.dev0
name: Flights
description: Ontology of flights into and out of airports.
requires:
Expand Down
2 changes: 1 addition & 1 deletion examples/flights.semantic_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

version: 0.2.0.dev0
version: 0.3.0.dev0
name: Flights semantic model
datasets:
- name: RUNWAY
Expand Down
4 changes: 2 additions & 2 deletions examples/flights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

version: 0.2.0.dev0
version: 0.3.0.dev0
name: Flights
description: Ontology of flights into and out of airports.
requires:
Expand Down Expand Up @@ -540,7 +540,7 @@ ontology:
ontology_mappings:
- name: flights_mapping
semantic_model:
version: 0.2.0.dev0
version: 0.3.0.dev0
name: Flights semantic model
datasets:
- name: RUNWAY
Expand Down
2 changes: 1 addition & 1 deletion examples/renamed_fields.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# all name the fields, never the source columns, as described in
# core-spec/spec.md "Name Resolution". Converters that compile to SQL
# against the source tables have to substitute each field's expression.
version: "0.2.0.dev0"
version: "0.3.0.dev0"
name: renamed_fields
description: Orders and customers whose field names differ from their source columns

Expand Down
2 changes: 1 addition & 1 deletion examples/tpcds_semantic_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# This example demonstrates the Ossie Core Metadata Spec using the TPC-DS benchmark schema
# TPC-DS is a decision support benchmark with a realistic retail business model

version: "0.2.0.dev0"
version: "0.3.0.dev0"

name: tpcds_retail_model
description: TPC-DS retail semantic model for sales and customer analytics
Expand Down
2 changes: 1 addition & 1 deletion ontology/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"properties": {
"version": {
"type": "string",
"const": "0.2.0.dev0",
"const": "0.3.0.dev0",
"description": "Mapping specification version"
},
"name": {
Expand Down
2 changes: 1 addition & 1 deletion ontology/ontology.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"properties": {
"version": {
"type": "string",
"const": "0.2.0.dev0",
"const": "0.3.0.dev0",
"description": "Ontology specification version"
},
"name": {
Expand Down
4 changes: 2 additions & 2 deletions ontology/ontology.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# Apache Ossie - Ontology Specification

**Version:** 0.2.0.dev0
**Version:** 0.3.0.dev0

## Table of Contents

Expand Down Expand Up @@ -690,7 +690,7 @@ though `Store` plays a role in three of the relationships.

## Version History

- **0.2.0.dev0** (2026-05-29): Basic support for ontologies and logical schema mappings
- **0.3.0.dev0** (Unreleased; started as 0.2.0.dev0 on 2026-05-29): Basic support for ontologies and logical schema mappings
- Breaking: each ontology map's `semantic_model` now requires its own `version`.
- Core ontology structure: Concepts, relationships, and business rules (requires and derived_by)
- Schema mappings from one or more logical models into an ontology
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dev = [

[project]
name = "apache-ossie"
version = "0.2.0.dev0"
version = "0.3.0.dev0"
description = "Python types for the Apache Ossie semantic model specification"
authors = [{ name = "Apache Software Foundation", email = "dev@ossie.apache.org" }]
requires-python = ">=3.11"
Expand Down
2 changes: 1 addition & 1 deletion python/src/ossie/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class OssieDocument(OssieSemanticModel):
# The schema pins this with `const`, so a document may not declare any other
# version. Mirrored as a Literal rather than a plain str, which would let the
# package serialize a version the schema rejects.
version: Literal["0.2.0.dev0"] = "0.2.0.dev0"
version: Literal["0.3.0.dev0"] = "0.3.0.dev0"

@model_serializer(mode="wrap")
def _serialize_document(self, handler: SerializerFunctionWrapHandler):
Expand Down
2 changes: 1 addition & 1 deletion python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _factory(value: str = "value") -> OssieExpression:
@pytest.fixture
def document_data() -> dict:
return {
"version": "0.2.0.dev0",
"version": "0.3.0.dev0",
"name": "typed_model",
"datasets": [
{
Expand Down
Loading
Loading