Mappings¶
The overlap is small: column fields and one contract price (ODCS), pricing plans (ODPS 4.1) and relationships (Apache Ossie). Do not expect a full ODCS or Ossie mapping. For every standard the spec builds on, including UCUM and ISO 4217, see Related standards.
The spec carries knowledge that other formats have no place for, so it is not a replacement for them. Where fields overlap they follow the other format's names or are mapped, as below. Mappings are defined here from the first implementation's models and pricing code; a generator that writes whole ODCS or Ossie files is not part of this version.
ODCS: columns¶
Each column maps to an ODCS schema property. ODCS has no unit field, so the unit fields go to customProperties.
| Declarations | ODCS |
|---|---|
type |
logicalType |
physical_type (declared value, else the build's) |
physicalType |
description |
description |
unit, currency, per |
customProperties entries {property: unit, currency or per, value: ...} |
per_unit, source_name, unit_from and unit_by have no ODCS counterpart either; they map to customProperties
entries in the same way.
ODCS: price¶
An ODCS (Open Data Contract Standard) contract has one price. It is filled from the first plan, in order, that has
a price, is not Revenue-sharing and is not a free unit (Freemium, Open-data, Trial). If none qualifies there
is no ODCS price.
| Declarations | ODCS |
|---|---|
pricing[].price |
price.priceAmount (as a number) |
pricing[].price_currency |
price.priceCurrency |
pricing[].price_unit, else GB when unit is Data-volume, else billing_duration |
price.priceUnit |
Absent values are left out.
ODPS 4.1: pricing plans¶
Every plan maps to one entry under pricingPlans.declarative.<language> (language en by default).
| Declarations | ODPS 4.1 | Note |
|---|---|---|
name |
name |
|
unit |
unit |
Same enumeration. |
price |
price |
Written as a string. |
price_currency |
priceCurrency |
|
billing_duration |
billingDuration |
|
max_transaction_quantity |
maxTransactionQuantity |
|
additional_price |
additionalPrice |
Written as a string. |
max_data_quantity |
maxDataQuantity |
|
min_price |
minPrice |
Written as a string. |
max_price |
maxPrice |
Written as a string. |
offering |
offering |
Omitted when empty. |
valid_from |
validFrom |
Date becomes a date-time at midnight UTC. |
valid_to |
validTo |
As above. |
notes |
notes |
|
price_unit |
- | Not an ODPS field; left out (it goes to ODCS). |
x- keys |
- | Left out. |
Apache Ossie: relationships¶
relationships is a map keyed by name; each entry follows the shape of an Ossie relationship.
| Declarations | Ossie | Note |
|---|---|---|
| the map key | name |
|
from |
from |
Many side. |
to |
to |
One side. |
from_columns |
from_columns |
Matched to to_columns by position. |
to_columns |
to_columns |
|
ai_context |
ai_context |
String or map. |
Facts and the other formats¶
None of the formats above has a place for facts. Do not read a fact kind as an ODCS element:
| Fact element | Nearest thing elsewhere | The difference |
|---|---|---|
kind: rule |
an ODCS quality rule | A rule fact is advice written for an agent, not an automated quality check, and it is not executable. The executable part is its optional probe, a script that passes or fails; the nearest ODCS element is a quality check, and the spec does not generate one |
kind: definition |
an ODCS column or contract description |
A loose analogy only: a definition is one dated, scoped statement that can be looked up by column, not the column's own description |
kind: quirk, recipe, finding |
none | |
kind: question |
none | A choice with no proposed answer yet; a proposed answer is a rule or quirk with status: proposed |
about, impact, status, expires, as_of, period, id |
none | Scope, ranking, review state, expiry, dates and a citation id on every statement |
Decision (review, votes, owner, settled_by) |
an ODCS contract's status and approval |
A contract has one status for the whole document, agreed before use. A decision is one house rule, in use while it is still proposed, with votes, a named person accountable and a person who settles it |
Also without a counterpart: dates_asof (an as-of date per source), removed_columns, withheld, the aliases
and exported. They are the reason the spec exists.
What is new is the review loop. A contract is signed before use. Here facts and proposed decisions apply as soon as an
agent writes them, labelled [unreviewed], and a person settles them later
(How agents and people work together).
If you already have an ODCS contract¶
Keep it. The nearest place in these files for what a contract already says (a hint for what goes where, not a generated mapping):
| In your ODCS contract | In these files |
|---|---|
schema property name, logicalType, physicalType, description |
columns.<name>, type, physical_type, description |
units, in customProperties |
unit, currency, per |
price |
pricing (one plan maps back, see above) |
| quality rules (executable checks) | stay in the contract; an agent-facing statement of the same thing is a rule fact, with a probe if a script re-tests it |
description.purpose, limitations, usage |
purpose; rule, quirk and recipe facts |
| service levels (freshness) | dates_asof with cadence and lag_days (display only) |
| team and owner | project.owner, team, org; a decision's owner names the person accountable for that one rule |
| usage terms | license |
| nothing | dates_asof (which release), facts' about and impact, removed_columns and aliases |