product.yaml is the product contract: the only metadata file a team writes. It declares what the product is, who owns it, what it reads, what it publishes and what it promises about that data. The compiler turns it into jobs, tables, grants, masks, quality checks and an ODCS contract per port. The rules in the rulebook check it.
This page describes every field. wam schema prints the same model as a JSON Schema for your editor.
#How the file is read
- Strict. An unknown key is an error, so a typo such as
freshnes: fails instead of being ignored. Each error names the file, the line and, where there is one, the rule: product.yaml (line 12) [DP010]: 'description' is required.
- Extensions. Keys that start with
x- are allowed at any level and kept for your own tooling, for example x-cost-centre: 4711. The compiler ignores them, except x-deidentified on a column (see DP021).
- Comments and order are kept. Commands that write to
product.yaml, such as wam describe, preserve comments, key order and quoting.
- YAML gotchas. Quote any value that contains
: , #, or a comma inside a { } flow map, and any value YAML might read as a number, date or boolean, such as "5(c)", "0.9" or "no".
- Defaults are layered. A field you leave out takes its value from the domain's
wam.yaml, then the policy pack, then the platform defaults. wam config explain <path> <key> shows which layer won.
#A complete example
name: lapse_risk
description: >-
Monthly probability that each in-force life policy lapses in the next three months, for retention campaigns
and the quarterly pricing review.
owner: team-risk-analytics
tier: P2
kind: consumer
inputs:
- ref: policy_admin.policies@v2
require: complete
freshness: 26h
- source.lifepro.premiums
outputs:
- name: lapse_risk
description: One row per policy and month end, scored by the lapse model.
keys: [policy_id, month_end]
materialize: table
load: {strategy: window, watermark: month_end, window_days: 62}
freshness: {sla_hours: 30}
access: approval
allowed_purposes: [retention, pricing]
columns:
policy_id: {type: string, description: Policy business key, term: "glossary://Policy/PolicyNumber", classification: internal}
month_end: {type: date, description: Month the score applies to, classification: internal}
lapse_probability: {type: double, description: "Modelled probability in [0,1] of lapse within 3 months", classification: confidential}
quality:
- unique: [policy_id, month_end]
- range: {column: lapse_probability, min: 0, max: 1}
on_failure: quarantine
consumers: [powerbi:risk_board, app:pricing_engine]
expectations:
- port: policy_admin.policies@v2
columns: [policy_id, status, start_date]
freshness: 26h
triggers: {mode: inputs, condition: ALL_UPDATED, min_interval: 30m}
release: {shadow_days: 7}
waivers:
- rule: DP045
reason: Small reference table, a snapshot is acceptable
approved_by: steward-risk
expires: 2027-03-31
tags: [risk, retention]
#Top-level fields
| Field | Type | Required | Default | Description |
|---|
name | string | yes | — | Product name, unique in the domain. Pattern ^[a-z][a-z0-9_]{1,62}$: snake_case, 2–63 characters, starting with a letter (DP001). |
description | string | yes | — | Purpose and main use, at least 40 characters (DP010). Shown in the marketplace and Unity Catalog, and used as the contract purpose for ports without their own description. |
owner | string | yes | — | The Entra ID group that owns the product. It must exist and have at least two members (DP002, checked online). |
tier | P1 | P2 | P3 | P4 | no | P3 | Criticality. It sets the required tests (DP060), whether undescribed columns block (DP011), retries and alerting in the job, and whether undeclared reads block (DP055). See tiers. |
kind | source | aggregate | consumer | reference | no | consumer | source publishes one system as it is (all columns need a classification, DP020). aggregate conforms an entity across sources. consumer serves one use case. reference is a code list or mapping. |
domain | string | no | from wam.yaml or folder | Overrides the domain taken from the folder layout. |
inputs | list of input | no | [] | Everything the SQL reads. Undeclared reads are findings (DP055). |
outputs | list of output ports | yes, at least one | — | The published tables and other port types. |
expectations | list of expectations | no | [] | What this product relies on in its inputs, registered with their owners. |
exports | list of exports | no | [] | Scheduled file deliveries from a port. |
value | list of value links | no | [] | Business decisions or processes the product serves. |
triggers | triggers | no | inputs, ALL_UPDATED | When the job runs. |
release | release | no | none | Shadow release before promotion. |
sandbox | sandbox | no | pii: masked | How PR sandboxes treat personal data. |
waivers | list of waivers | no | [] | Time-boxed exceptions to rules. |
ai_system | AI system | no | none | EU AI Act declaration for products that feed a model. |
mode | managed | adopted | no | managed | adopted means the logic is built elsewhere (for example dbt, see wam adopt dbt) and whatamesh governs, documents and checks it. |
adopted | map | no | {} | Where an adopted product comes from (written by wam adopt dbt). |
tags | list of strings | no | [] | Free tags for search in the marketplace. |
wam_version | string | no | 0.1.0 in the bundle | Runtime version pinned in the generated bundle (whatamesh==<version>). Quote it: "0.9". |
policy_pack | string | no | none | The pack this product is checked against, as name@version, for traceability. CI passes the pack file with wam validate --pack. |
outputs_advanced | map: port name → map | no | {} | Per-port settings for versions and serving. See advanced. |
compute | map | no | {} | performance_target: STANDARD | PERFORMANCE_OPTIMIZED for serverless jobs. |
advanced | map | no | {} | Escape hatch: extra job tasks and bundle_overrides, merged into the generated bundle. |
Each entry is either a reference string or a map. These two are the same:
inputs:
- policy_admin.policies@v2
- {ref: policy_admin.policies@v2, require: any}
| Field | Type | Default | Description |
|---|
ref | reference | required | What is read. See references. |
require | complete | any | any | With complete, the product does not trigger when the upstream run committed only part of its rows (on_failure: quarantine with quarantined rows). |
freshness | duration | none | The oldest input data you accept, for example 26h or 2d. |
#References
References are logical names. The compiler resolves them to physical tables per environment, so SQL never contains catalog names (DP030).
| Form | Meaning | Resolves to (env prod) |
|---|
domain.port | Version 1 of another product's port | dp_<domain>_prod.out.<port>_v1 |
domain.port@vN | Version N of a port | dp_<domain>_prod.out.<port>_vN |
domain.product.port[@vN] | Same, with the product named | dp_<domain>_prod.out.<port>_vN |
source.system.table | A raw source table landed for this domain | dp_<this domain>_prod.raw_<system>.<table> |
The reference pattern is ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+(@v\d+)?$.
#Durations
Durations are a number followed by s, m, h or d: 30m, 26h, 2d.
#outputs
An output port is something consumers can read. Each table port is published as dp_<domain>_<env>.out.<name>_v<version> and has its own contract, reader group and SQL file sql/<name>.sql.
| Field | Type | Default | Description |
|---|
name | string | required | Port name, same pattern as the product name (DP001). The SQL is read from sql/<name>.sql. |
description | string | product description | What one row means. At least 40 characters when given (DP010). |
type | table | feature_table | document_collection | vector_index | regulatory | table | The port type. The last three need their own block, named in port types. |
keys | list of column names | [] | Business key. Required for merge, scd2 and window (DP040). Key columns are created NOT NULL and marked primaryKey in the contract. |
materialize | table | streaming_table | materialized_view | view | metric_view | table | How the port is created in Unity Catalog. |
load | load | inferred | How new data is written. |
freshness | {sla_hours: number > 0} | none | Freshness promise. It counts as the freshness check for DP060 and goes into the contract's slaProperties. |
access | open | approval | restricted | approval | How access requests are handled (Enterprise access workflow). Every request states a purpose, which must match allowed_purposes when that is set. open: granted automatically, for up to 365 days. approval: the owner approves, for up to 365 days. restricted: the owner and a data steward approve, for up to 180 days. Requests for confidential columns also need a steward. |
allowed_purposes | list of strings | [] | Purposes a consumer can request access for. Used in access requests and in the GDPR record of processing. |
columns | map: column → column | {} | Documentation, types and classification per column. |
quality | list of quality rules | [] | Checks run after every load. |
on_failure | block | quarantine | warn | block | What happens when a check fails. See quality. |
consumers | list of strings | [] | Known consumers as kind:name, for example powerbi:risk_board or app:pricing_engine. Listed in the contract and notified of changes. |
implements | domain.contract@vN | none | A group contract this port conforms to (Enterprise, DP112). |
excel | boolean | none | Offer the port in the Excel add-in. |
#columns
| Field | Type | Description |
|---|
description | string | What the column means. Every published column needs one: DP011 blocks at P1 and P2 and warns at P3 and P4. |
type | Databricks SQL type | For example string, bigint, decimal(18,2), date, timestamp or array<string>. It becomes the contract's physicalType, and its logicalType is derived (decimal, double and float → number; int, bigint, smallint and tinyint → integer; date and timestamp → date; boolean → boolean; everything else → string). A type change is a breaking change. |
classification | public | internal | confidential | restricted | Sensitivity. Required for every column of a source product (DP020). confidential and restricted columns get a column mask. |
pii | string | The kind of personal data, for example email, phone, name, national_id or health. PII columns get a mask, and PII is tracked through lineage into downstream products (DP021). |
term | URI | A business glossary term, for example glossary://Policy/PolicyNumber. |
Masks let members of the unmask group see the value. Everyone else sees ***, or for pii: email, ***@domain.
#load
| Field | Type | Description |
|---|
strategy | see the table below | When left out: merge if the port has keys, otherwise snapshot. |
watermark | column name | The date column that window replaces by. Required for window (DP040). |
window_days | integer ≥ 1 | How many days back window rewrites on each run. Required for window. |
| Strategy | What each run does | Needs |
|---|
merge | Upserts by key: matching rows are updated, new ones inserted. | keys |
snapshot | Replaces the whole table. DP045 warns above 50 million rows. | — |
append | Inserts every row the SQL returns. | — |
window | Replaces only the rows with watermark in (end − window_days, end], so late corrections inside the window are picked up. | keys, watermark, window_days |
scd2 | Type-2 history: a changed row closes the current version (_valid_to, _is_current = false) and inserts a new one. The SQL must return a _change_ts column. | keys |
cdc_apply | Applies a change feed as a Lakeflow pipeline with AUTO CDC: rows carry _op (insert, update, delete) and are ordered by _seq. | keys |
custom | You write the load as an extra task in advanced.tasks. | — |
#quality
Each rule is a one-key map. Rules run on every load, and their results go into the run record and the Trust Score.
| Rule | Form | Fails when |
|---|
unique | unique: [col, ...] | Two rows share the same combination of these columns. |
not_null | not_null: [col, ...] | Any of these columns is null. |
range | range: {column: c, min: 0, max: 1} | A non-null value is below min or above max. Either bound may be left out. |
accepted_values | accepted_values: {column: c, values: [a, b]} | A non-null value is not in the list. |
reconcile | reconcile: {against: ref, key: col, tolerance: 0.005} | The count of distinct key values differs from the reference by more than tolerance (a fraction, default 0.5%). key defaults to policy_id. Required at P1. |
sql | sql: "<boolean expression>" | A row does not satisfy the expression, for example sql: "paid_amount <= incurred_amount". |
freshness | via the port's freshness: | The newest data is older than sla_hours. |
What on_failure does when a rule fails:
| Value | Effect |
|---|
block | Nothing is committed and the run fails. Consumers keep the previous data. |
quarantine | Failing rows go to dp_<domain>_<env>.quarantine.<port> with a _wam_reasons column, and the rest are committed. The run is marked partial, so consumers with require: complete do not trigger. |
warn | Everything is committed and the failure is reported. |
Required rules by tier (DP060):
| Tier | Required |
|---|
| P1 | unique, not_null, reconcile, freshness |
| P2 | unique, freshness |
| P3 | unique |
| P4 | — |
#Port types
type | Extra block | Use |
|---|
table | — | The default: a Delta table. |
feature_table | — | A table of model features, keyed by entity and as-of date. It compiles like table; the type tells consumers and the catalog what it is for. |
document_collection | document: | Files parsed, chunked and redacted for retrieval. |
vector_index | vector: | A Vector Search index over a document collection. |
regulatory | regulatory: | A table bound to supervisory taxonomy data points (DP111). |
document:
| Field | Default | Description |
|---|
source | required | A Unity Catalog volume path or a connector, for example /Volumes/claims/docs. |
parser | ai_parse_document | Parsing function. |
chunk_size | 800 | Characters per chunk, at least 50. |
chunk_overlap | 80 | Characters shared between neighbouring chunks. |
metadata | [document_id, type, date, owner_system] | Columns kept with each chunk. |
pii | {} | Per kind of personal data: redact, mask, drop or keep, for example {phone: redact, national_id: drop}. |
row_filter_column | none | Column used to filter rows by the reader's group. |
vector:
| Field | Default | Description |
|---|
collection | required | The document_collection port it indexes. |
embedding_endpoint | databricks-gte-large-en | Model Serving endpoint that computes embeddings. |
columns | [text] | Columns that are embedded. |
filters | [] | Columns available as query filters. |
recall_at_k | {k: 5, min: 0.8} | Quality bar checked against a labelled question set. |
regulatory:
| Field | Description |
|---|
taxonomy | Taxonomy and version, for example eiopa-sii-2.8. |
template | Template code, for example S.06.02 or S.05.01.02.01. |
mapping | Port column → data point code. Every mandatory data point of the template must be mapped or waived (DP111). |
waived | Data point codes deliberately not reported, for example a row the undertaking has no business in. |
#expectations
What this product relies on in an input. Expectations are registered with the input's owner: a change on their side that breaks one fails their gate 2 (DP063).
| Field | Type | Description |
|---|
port | reference | The input port. |
columns | list | Columns that must keep existing with the same type. |
rules | list of quality rules | Rules the data must keep meeting, in the same form as quality:. |
freshness | duration | The freshness you rely on. |
#exports
| Field | Type | Default | Description |
|---|
name | string | required | Export name. |
port | port name | required | The port to export. |
format | csv | parquet | json | csv | File format. |
schedule | string | none | When to deliver: a cron expression or a business-day rule such as business_day(+4). |
destination | URI | required | For example sftp://reg-gateway/outbound/lapse/ or a volume path. |
options | map | {} | Format options such as delimiter, encoding, header and checksum: sha256. |
#value
| Field | Type | Default | Description |
|---|
serves | string | required | The decision or process the product serves, for example Quarterly pricing review (risk committee). |
criticality | low | medium | high | medium | How much that process depends on the product. |
estimate | map | none | Optional value estimate, for example {eur_per_year: 250000, basis: "..."}. |
#triggers
| Field | Type | Default | Description |
|---|
mode | inputs | schedule | both | inputs | inputs runs when input tables are updated (a table-update trigger). schedule runs on a cron. both does both. |
condition | ALL_UPDATED | ANY_UPDATED | ALL_UPDATED | With several inputs: wait for all of them, or run on any. |
min_interval | duration | none | Minimum time between two triggered runs. |
schedule | Quartz cron | none | For schedule and both, for example 0 0 6 ? * MON-FRI. Time zone Europe/Warsaw. |
#release
| Field | Type | Description |
|---|
shadow_days | integer 1–30 | Run the new release next to the current one for this many days and compare outputs before promotion (Enterprise). |
#sandbox
| Field | Type | Default | Description |
|---|
pii | masked | synthetic | none | masked | How personal data appears in PR sandboxes: masked, replaced with synthetic values, or as it is (only for products without personal data). |
#waivers
A waiver accepts a rule's finding for a limited time. The finding is still reported, marked waived, and stops blocking. After expires it blocks again and says that the waiver expired.
| Field | Type | Description |
|---|
rule | rule id | For example DP060. |
reason | string | Why the exception is acceptable. |
approved_by | string | The steward or group that approved it. |
expires | date | YYYY-MM-DD. |
#ai_system
Declares that the product feeds an AI system under the EU AI Act (Enterprise, Regulated pack).
| Field | Type | Default | Description |
|---|
name | string | required | AI system name, used by wam evidence ai-system. |
intended_purpose | string | required | What the system is used for. |
risk_class | high | limited | minimal | required | For high, DP110 blocks unless the training data is shown to represent the reference population. |
annex_iii | string | none | Annex III point, quoted, for example "5(c)" (risk assessment and pricing in life and health insurance). |
model | string | none | The registered model, for example models.pricing.life_gbm. |
owner, deployer | string | none | Provider and deployer roles. |
reference_population | reference | none | The port the training data is compared with. |
attributes | list | [] | Attributes checked for representativeness, for example [age_band, region]. |
training_release | string | none | Release of the data used for training. |
retention_years | integer ≥ 1 | 10 | How long the evidence is kept. |
#Advanced settings
outputs_advanced is a map from port name to settings that are rarely needed:
| Key | Description |
|---|
versions | Live versions of the port, for example [1, 2]. Each one gets its own table, reader group, grants and masks. At most two (DP061). |
deprecated_until | Version → date after which the old version is removed, for example {1: 2027-03-31}. |
retention_days | Delta time-travel retention (platform default 30). |
change_feed | Enable the Delta change data feed. |
serve | Extra serving: lakebase (synced Postgres table), genie, share (Delta Sharing, with recipients and external) and agent (MCP agent port, Enterprise). External shares must meet DP075. |
advanced.tasks adds Lakeflow job tasks in Databricks bundle syntax, for example a Python wheel that scores a model after the port is written. advanced.bundle_overrides is merged into the generated databricks.yml. Both are reviewed in the pull request like any other change.
#Tiers
| Tier | Meant for | Required checks | Undescribed columns | Retries | Run-duration alert | Undeclared reads |
|---|
| P1 | Business-critical, regulatory | unique, not_null, reconcile, freshness | block | 3 | 60 min, plus on-call | block |
| P2 | Important, shared across teams | unique, freshness | block | 2 | 120 min | warn |
| P3 | Team use | unique | warn | 1 | 240 min | warn |
| P4 | Exploratory | — | warn | 0 | 480 min | warn |
#SQL files
Each output port has sql/<port>.sql: one SELECT in Databricks SQL that returns the published columns. Other .sql files in the folder are internal steps that ports can read by name.
| Syntax | Meaning |
|---|
{{ ref('domain.port@v2') }} | A declared input, resolved per environment. |
{{ ref('source.system.table') }} | A raw source table of this domain. |
{{ this }} | The port's own target table, for incremental logic. |
{{ window_start }}, {{ window_end }} | The bounds of the current load window. |
The SQL is parsed with sqlglot on the Databricks dialect, which gives the published columns (for DP011 and DP020), the tables read (DP055), column lineage for PII (DP021) and an expression fingerprint per column for change classes. SELECT * is blocked in ports (DP033), physical catalog names are blocked (DP030), and more than five template variables in one file produce a warning (DP031).
#Domain defaults: wam.yaml
A wam.yaml in the domain folder sets defaults for every product below it. Its defaults: map, or the whole file if there is none, is merged under each product.yaml:
domain: finance
defaults:
tier: P2
triggers: {condition: ANY_UPDATED}
compute: {performance_target: STANDARD}
Platform defaults are tier: P3, kind: consumer, triggers: {mode: inputs, condition: ALL_UPDATED}, compute.performance_target: STANDARD, retention_days: 30, on_failure: block and access: approval.
#What the compiler generates
wam build --emit DIR writes one ODCS v3.0.0 contract per port. Each contract field comes from product.yaml like this:
| Contract field | From |
|---|
id | urn:wam:mesh:<domain>:<product>:<port>:v<N> |
name, version | <port>_v<N>, <N>.0.0 |
domain, dataProduct | domain, name |
description.purpose | port description, else product description |
schema[].properties[] | each column: name, physicalType (type, default string), derived logicalType, description, classification, primaryKey (in keys) |
quality[] | each quality rule as {type: library, rule, arguments} |
slaProperties | freshness.sla_hours as {property: freshness, value, unit: h} |
team | owner with role owner |
It also writes the bundle (databricks.yml), an ODPS descriptor and the marketplace payload. See wam build.
#Change classes
When a pull request changes a product, wam diff and gate 2 compare it with main:
| Change | Class | Consequence |
|---|
| Port removed, column removed, column type changed, keys changed | breaking | Publish as a new port version (DP007); the old one runs until its deprecated_until. |
| Removed columns nobody read in 90 days | breaking-unused | Allowed with notice. |
| SQL expression of an existing column changed | semantic | Warning (DP062): declare a bugfix or bump the version. |
| New port, new column, metadata change | additive | Allowed. |
| Nothing published changed | internal | Allowed. |