Skip to main content

Apache Ossie in Infinite Data

Apache Ossie (incubating) is an open specification for describing semantic models: datasets, fields, relationships and metrics, in a format that BI tools and AI agents can exchange. This page shows what Infinite Data already does with an Ossie model, how that was verified, and what it does not do yet.

Apache Ossie defines the semantics. NNumbers governs how those semantics are executed against enterprise data.

What it does​

  • Reads an Apache Ossie document in which each dataset points to a table of the catalog (catalog.schema.table) and declares fields, a key, many-to-one relationships, metrics and AI context (ai_context, with instructions, synonyms and examples).
  • Takes a question made of metrics, dimensions and a filter, with no hand-written SQL.
  • Builds the SQL from what the model declares and runs it on QueryMesh with the identity of whoever asks. The Data Rules of that identity decide what comes back.
  • Refuses a question that the model cannot answer safely, such as one that would count the same row more than once. It would rather refuse than return a wrong number.

How the pieces fit together​

StepRole
1. Apache Ossie modelDescribes what the data means: datasets, fields, relationships and metrics. It holds no access rule.
2. Infinite DataHolds the tables that the model describes. Each dataset points to a table of the catalog.
3. ConsumerTurns the question into SQL using only what the model declares. It can be an AI agent, a notebook or a program.
4. QueryMeshReceives the SQL together with the identity of whoever asks, applies the Data Rules of that identity and runs the query.

In this proof, the consumer is a reference program. The integration with Imaginne is being designed and has not been verified yet. NNumbers Ontology, the NNumbers service to version, validate and publish Apache Ossie semantic models, is under development.

What works today​

Verified on November 14, 2026, in a lab, with synthetic data:

  • Model. One document with 5 datasets (monthly sales, salespeople, stores, products and inventory), 65 fields, 3 many-to-one relationships, one of them with a three-column key, 20 metrics, and ai_context at every level.
  • Questions. Metrics of one dataset with dimensions of the same dataset or of datasets reached through many-to-one relationships, in one or two hops, and a filter.
  • Cross-check. Ten questions, which produced 13 queries and 64 result rows, were compared with hand-written SQL run through a different path. Every value matched.
  • Refusals. Before querying, the consumer refused the questions that would multiply rows, the ones that mix metrics of different datasets, and the ones that use what it does not support.
Apache Ossie featureStatus
0.3.0.dev0 document, one model per documentRead and validated
source written as catalog.schema.tableSupported
Fields with expression.sql, including computed fieldsSupported
primary_key and many-to-one relationships, with a simple or composite keySupported
Dataset-scoped metrics (datasets[].metrics)Supported
Model-scoped metrics that read a single datasetSupported
Model-scoped metrics that combine datasetsRefused, not computed
Metric over metric with AGG() and window functions (OVER)Refused
Expressions in vendor dialects (expression.dialects)Ignored; only the portable form is read
ai_contextPreserved in the model; not used by an agent yet
nonportable_extensionsPreserved, not interpreted
Query interfaces of the specification (Layers 2 and 3)Not implemented

Example: from the model to the query​

This minimal model describes two tables of the demo and the relationship between them. It passes the official validator. The demo tables have Portuguese names: faturamento is revenue, filial is branch, vendedores are salespeople, canal is channel and ano_mes is year-month.

version: 0.3.0.dev0
name: varejo_demo
description: Sales by salesperson and by branch of a fictional retailer (synthetic data).
ai_context:
instructions: Use the metrics of the model. Each metric starts from its own dataset.
datasets:
- name: vendas_mensal
source: lakehouse."03_gold".gold_vendas_mensal
primary_key: [ano_mes, filial_codigo, canal]
description: Invoiced sales by month, branch and channel.
fields:
- name: ano_mes
expression:
sql: ano_mes
- name: filial_codigo
expression:
sql: filial_codigo
- name: canal
expression:
sql: canal
- name: filial_regiao
expression:
sql: filial_regiao
description: Geographic region of the branch.
ai_context:
synonyms: [region, area]
- name: vendedores_ranking
source: lakehouse."03_gold".gold_vendedores_ranking
primary_key: [ano_mes, vendedor_id, filial_codigo, canal]
description: Invoiced sales by salesperson, month, branch and channel.
fields:
- name: ano_mes
expression:
sql: ano_mes
- name: vendedor_id
expression:
sql: vendedor_id
- name: filial_codigo
expression:
sql: filial_codigo
- name: canal
expression:
sql: canal
- name: faturamento
expression:
sql: faturamento
datatype: Decimal
metrics:
- name: total_faturamento
expression:
sql: SUM(faturamento)
description: Revenue of the orders handled by a salesperson.
ai_context:
synonyms: [sales team revenue]
examples: ["How much did the sales team sell by region in 2026?"]
- name: faturamento_por_vendedor
expression:
sql: SUM(faturamento) / COUNT(DISTINCT vendedor_id)
description: Revenue divided by the number of salespeople with at least one sale.
relationships:
- name: vendedores_para_vendas_mensal
from: vendedores_ranking
to: vendas_mensal
from_columns: [ano_mes, filial_codigo, canal]
to_columns: [ano_mes, filial_codigo, canal]

The question "how much did the sales team sell by region in 2026?" has three parts:

PartValue
Metricsvendedores_ranking.total_faturamento, vendedores_ranking.faturamento_por_vendedor
Dimensionvendas_mensal.filial_regiao
Filtervendedores_ranking.ano_mes >= '2026-01'

The consumer generated this query:

SELECT "vendas_mensal"."filial_regiao" AS "vendas_mensal__filial_regiao",
SUM("vendedores_ranking"."faturamento") AS "total_faturamento",
CAST(SUM("vendedores_ranking"."faturamento") AS DOUBLE)
/ COUNT(DISTINCT "vendedores_ranking"."vendedor_id") AS "faturamento_por_vendedor"
FROM "lakehouse"."03_gold"."gold_vendedores_ranking" AS "vendedores_ranking"
LEFT JOIN "lakehouse"."03_gold"."gold_vendas_mensal" AS "vendas_mensal"
ON "vendedores_ranking"."ano_mes" = "vendas_mensal"."ano_mes"
AND "vendedores_ranking"."filial_codigo" = "vendas_mensal"."filial_codigo"
AND "vendedores_ranking"."canal" = "vendas_mensal"."canal"
WHERE "vendedores_ranking"."ano_mes" >= '2026-01'
GROUP BY 1
ORDER BY "total_faturamento" DESC, 1

What to notice in the query:

  • The query starts from the dataset of the metric (vendedores_ranking) and reaches the dimension through the relationship, in the many-to-one direction.
  • The join is a LEFT JOIN: a row without a match would fall into an empty group instead of dropping out of the total.
  • Division in Ossie always keeps the fractional part, which is why the numerator is cast before dividing.

Result in the demo, with synthetic data as of November 14, 2026:

RegionRevenueRevenue per salesperson
Sul44,499,654.51489,007.19
Sudeste23,057,374.62411,738.83

In the full model, the opposite question is refused: summing the revenue of vendas_mensal grouped by salesperson would count each sales row once per salesperson.

Who asks is who queries​

The consumer has no credential of its own. It sends QueryMesh the token of whoever asks, and that identity is the one that queries the data. In the tests:

  • with a valid identity, the query ran as that identity;
  • with a model that points to a table the identity is not allowed to read, QueryMesh denied access, and the consumer returned the denial without trying another path;
  • with an invalid token, nothing ran.

These tests used a test service account. We have not yet repeated the proof with two people under different Data Rules, to compare row filters and column masks on the same question.

Governance stays outside the model​

The model describes; it does not grant access.

  • The Ossie document holds no access rule, mask or row filter, and ai_context is not access control.
  • Data Rules are still created, reviewed and audited in Infinite Data. See What Data Rules are.
  • The same model can be handed to different people and agents. Each one gets what their rules allow, and whoever has no access gets the denial.

Validation with the official validator​

The model is validated with validation/validate.py from the apache/ossie repository, pinned to a commit. In the check of November 14, 2026, that was commit e53fda3, from November 13, with specification 0.3.0.dev0.

git clone https://github.com/apache/ossie
cd ossie
git checkout e53fda3
uv run validation/validate.py path/to/model.yaml
Validation PASSED: model.yaml

To confirm that passing means something, we repeated the validation with the same validator in two directions:

  • Control. The official example of the project, examples/tpcds_semantic_model.yaml, passed.
  • Negative tests. Nine copies of the model, each with one planted error, were rejected: a relationship to a dataset that does not exist, a relationship with a different number of columns, a type outside the vocabulary, a duplicate metric, invalid SQL, the previous version of the specification, an extension under its old name, a relationship naming a column that is not a field, and a dataset-scoped metric reading another dataset.

Because the specification is a draft, we follow the project repository. A model written in October for 0.2.0.dev0 stopped validating in November, and was migrated to 0.3.0.dev0.

Known limits​

  • Draft specification. 0.3.0.dev0 is the development version; the latest released version of Apache Ossie is 0.1.1. The validation holds for the commit above.
  • Lab only. The proof uses synthetic data. There is no Console screen or API to register, query or search models.
  • One origin per question. Every metric in a question must start from the same dataset. Metrics that combine datasets are refused.
  • Many-to-one relationships only. The opposite direction and ambiguous paths are refused.
  • No de-duplication. The result depends on the key of the "one" side of each relationship being unique. We measured that in the data before declaring each relationship.
  • No window metrics and no metric over metric. Expressions with OVER or AGG() are refused.
  • Portable expression only. The consumer reads expression.sql, written in OSSIE_SQL_2026, or an OSSIE_SQL_2026 or ANSI_SQL entry in dialects. Vendor dialects are ignored.
  • The source is a table. A query in place of source is not supported.
  • Not a conforming implementation. The query interfaces of the specification (Layers 2 and 3) are not implemented. The consumer only borrows the Layer 3 rules for joins and filters, in the single-origin case.
  • Outside the model. Glossary, data owner, lineage and sensitivity classification are not part of this integration.

Apache Ossie, Ossie and Apache are trademarks of the Apache Software Foundation. Apache Ossie is a project undergoing incubation at the foundation, and the use of these marks here does not imply endorsement.

Next steps​