Build

product.yaml reference

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

FieldTypeRequiredDefaultDescription
namestringyes—Product name, unique in the domain. Pattern ^[a-z][a-z0-9_]{1,62}$: snake_case, 2–63 characters, starting with a letter (DP001).
descriptionstringyes—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.
ownerstringyes—The Entra ID group that owns the product. It must exist and have at least two members (DP002, checked online).
tierP1 | P2 | P3 | P4noP3Criticality. 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.
kindsource | aggregate | consumer | referencenoconsumersource 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.
domainstringnofrom wam.yaml or folderOverrides the domain taken from the folder layout.
inputslist of inputno[]Everything the SQL reads. Undeclared reads are findings (DP055).
outputslist of output portsyes, at least one—The published tables and other port types.
expectationslist of expectationsno[]What this product relies on in its inputs, registered with their owners.
exportslist of exportsno[]Scheduled file deliveries from a port.
valuelist of value linksno[]Business decisions or processes the product serves.
triggerstriggersnoinputs, ALL_UPDATEDWhen the job runs.
releasereleasenononeShadow release before promotion.
sandboxsandboxnopii: maskedHow PR sandboxes treat personal data.
waiverslist of waiversno[]Time-boxed exceptions to rules.
ai_systemAI systemnononeEU AI Act declaration for products that feed a model.
modemanaged | adoptednomanagedadopted means the logic is built elsewhere (for example dbt, see wam adopt dbt) and whatamesh governs, documents and checks it.
adoptedmapno{}Where an adopted product comes from (written by wam adopt dbt).
tagslist of stringsno[]Free tags for search in the marketplace.
wam_versionstringno0.1.0 in the bundleRuntime version pinned in the generated bundle (whatamesh==<version>). Quote it: "0.9".
policy_packstringnononeThe pack this product is checked against, as name@version, for traceability. CI passes the pack file with wam validate --pack.
outputs_advancedmap: port name → mapno{}Per-port settings for versions and serving. See advanced.
computemapno{}performance_target: STANDARD | PERFORMANCE_OPTIMIZED for serverless jobs.
advancedmapno{}Escape hatch: extra job tasks and bundle_overrides, merged into the generated bundle.

inputs

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}
FieldTypeDefaultDescription
refreferencerequiredWhat is read. See references.
requirecomplete | anyanyWith complete, the product does not trigger when the upstream run committed only part of its rows (on_failure: quarantine with quarantined rows).
freshnessdurationnoneThe 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).

FormMeaningResolves to (env prod)
domain.portVersion 1 of another product's portdp_<domain>_prod.out.<port>_v1
domain.port@vNVersion N of a portdp_<domain>_prod.out.<port>_vN
domain.product.port[@vN]Same, with the product nameddp_<domain>_prod.out.<port>_vN
source.system.tableA raw source table landed for this domaindp_<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.

FieldTypeDefaultDescription
namestringrequiredPort name, same pattern as the product name (DP001). The SQL is read from sql/<name>.sql.
descriptionstringproduct descriptionWhat one row means. At least 40 characters when given (DP010).
typetable | feature_table | document_collection | vector_index | regulatorytableThe port type. The last three need their own block, named in port types.
keyslist of column names[]Business key. Required for merge, scd2 and window (DP040). Key columns are created NOT NULL and marked primaryKey in the contract.
materializetable | streaming_table | materialized_view | view | metric_viewtableHow the port is created in Unity Catalog.
loadloadinferredHow new data is written.
freshness{sla_hours: number > 0}noneFreshness promise. It counts as the freshness check for DP060 and goes into the contract's slaProperties.
accessopen | approval | restrictedapprovalHow 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_purposeslist of strings[]Purposes a consumer can request access for. Used in access requests and in the GDPR record of processing.
columnsmap: column → column{}Documentation, types and classification per column.
qualitylist of quality rules[]Checks run after every load.
on_failureblock | quarantine | warnblockWhat happens when a check fails. See quality.
consumerslist of strings[]Known consumers as kind:name, for example powerbi:risk_board or app:pricing_engine. Listed in the contract and notified of changes.
implementsdomain.contract@vNnoneA group contract this port conforms to (Enterprise, DP112).
excelbooleannoneOffer the port in the Excel add-in.

columns

FieldTypeDescription
descriptionstringWhat the column means. Every published column needs one: DP011 blocks at P1 and P2 and warns at P3 and P4.
typeDatabricks SQL typeFor 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.
classificationpublic | internal | confidential | restrictedSensitivity. Required for every column of a source product (DP020). confidential and restricted columns get a column mask.
piistringThe 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).
termURIA 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

FieldTypeDescription
strategysee the table belowWhen left out: merge if the port has keys, otherwise snapshot.
watermarkcolumn nameThe date column that window replaces by. Required for window (DP040).
window_daysinteger ≥ 1How many days back window rewrites on each run. Required for window.
StrategyWhat each run doesNeeds
mergeUpserts by key: matching rows are updated, new ones inserted.keys
snapshotReplaces the whole table. DP045 warns above 50 million rows.—
appendInserts every row the SQL returns.—
windowReplaces only the rows with watermark in (end − window_days, end], so late corrections inside the window are picked up.keys, watermark, window_days
scd2Type-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_applyApplies a change feed as a Lakeflow pipeline with AUTO CDC: rows carry _op (insert, update, delete) and are ordered by _seq.keys
customYou 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.

RuleFormFails when
uniqueunique: [col, ...]Two rows share the same combination of these columns.
not_nullnot_null: [col, ...]Any of these columns is null.
rangerange: {column: c, min: 0, max: 1}A non-null value is below min or above max. Either bound may be left out.
accepted_valuesaccepted_values: {column: c, values: [a, b]}A non-null value is not in the list.
reconcilereconcile: {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.
sqlsql: "<boolean expression>"A row does not satisfy the expression, for example sql: "paid_amount <= incurred_amount".
freshnessvia the port's freshness:The newest data is older than sla_hours.

What on_failure does when a rule fails:

ValueEffect
blockNothing is committed and the run fails. Consumers keep the previous data.
quarantineFailing 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.
warnEverything is committed and the failure is reported.

Required rules by tier (DP060):

TierRequired
P1unique, not_null, reconcile, freshness
P2unique, freshness
P3unique
P4—

Port types

typeExtra blockUse
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_collectiondocument:Files parsed, chunked and redacted for retrieval.
vector_indexvector:A Vector Search index over a document collection.
regulatoryregulatory:A table bound to supervisory taxonomy data points (DP111).

document:

FieldDefaultDescription
sourcerequiredA Unity Catalog volume path or a connector, for example /Volumes/claims/docs.
parserai_parse_documentParsing function.
chunk_size800Characters per chunk, at least 50.
chunk_overlap80Characters 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_columnnoneColumn used to filter rows by the reader's group.

vector:

FieldDefaultDescription
collectionrequiredThe document_collection port it indexes.
embedding_endpointdatabricks-gte-large-enModel 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:

FieldDescription
taxonomyTaxonomy and version, for example eiopa-sii-2.8.
templateTemplate code, for example S.06.02 or S.05.01.02.01.
mappingPort column → data point code. Every mandatory data point of the template must be mapped or waived (DP111).
waivedData 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).

FieldTypeDescription
portreferenceThe input port.
columnslistColumns that must keep existing with the same type.
ruleslist of quality rulesRules the data must keep meeting, in the same form as quality:.
freshnessdurationThe freshness you rely on.

exports

FieldTypeDefaultDescription
namestringrequiredExport name.
portport namerequiredThe port to export.
formatcsv | parquet | jsoncsvFile format.
schedulestringnoneWhen to deliver: a cron expression or a business-day rule such as business_day(+4).
destinationURIrequiredFor example sftp://reg-gateway/outbound/lapse/ or a volume path.
optionsmap{}Format options such as delimiter, encoding, header and checksum: sha256.

value

FieldTypeDefaultDescription
servesstringrequiredThe decision or process the product serves, for example Quarterly pricing review (risk committee).
criticalitylow | medium | highmediumHow much that process depends on the product.
estimatemapnoneOptional value estimate, for example {eur_per_year: 250000, basis: "..."}.

triggers

FieldTypeDefaultDescription
modeinputs | schedule | bothinputsinputs runs when input tables are updated (a table-update trigger). schedule runs on a cron. both does both.
conditionALL_UPDATED | ANY_UPDATEDALL_UPDATEDWith several inputs: wait for all of them, or run on any.
min_intervaldurationnoneMinimum time between two triggered runs.
scheduleQuartz cronnoneFor schedule and both, for example 0 0 6 ? * MON-FRI. Time zone Europe/Warsaw.

release

FieldTypeDescription
shadow_daysinteger 1–30Run the new release next to the current one for this many days and compare outputs before promotion (Enterprise).

sandbox

FieldTypeDefaultDescription
piimasked | synthetic | nonemaskedHow 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.

FieldTypeDescription
rulerule idFor example DP060.
reasonstringWhy the exception is acceptable.
approved_bystringThe steward or group that approved it.
expiresdateYYYY-MM-DD.

ai_system

Declares that the product feeds an AI system under the EU AI Act (Enterprise, Regulated pack).

FieldTypeDefaultDescription
namestringrequiredAI system name, used by wam evidence ai-system.
intended_purposestringrequiredWhat the system is used for.
risk_classhigh | limited | minimalrequiredFor high, DP110 blocks unless the training data is shown to represent the reference population.
annex_iiistringnoneAnnex III point, quoted, for example "5(c)" (risk assessment and pricing in life and health insurance).
modelstringnoneThe registered model, for example models.pricing.life_gbm.
owner, deployerstringnoneProvider and deployer roles.
reference_populationreferencenoneThe port the training data is compared with.
attributeslist[]Attributes checked for representativeness, for example [age_band, region].
training_releasestringnoneRelease of the data used for training.
retention_yearsinteger ≥ 110How long the evidence is kept.

Advanced settings

outputs_advanced is a map from port name to settings that are rarely needed:

KeyDescription
versionsLive versions of the port, for example [1, 2]. Each one gets its own table, reader group, grants and masks. At most two (DP061).
deprecated_untilVersion → date after which the old version is removed, for example {1: 2027-03-31}.
retention_daysDelta time-travel retention (platform default 30).
change_feedEnable the Delta change data feed.
serveExtra 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

TierMeant forRequired checksUndescribed columnsRetriesRun-duration alertUndeclared reads
P1Business-critical, regulatoryunique, not_null, reconcile, freshnessblock360 min, plus on-callblock
P2Important, shared across teamsunique, freshnessblock2120 minwarn
P3Team useuniquewarn1240 minwarn
P4Exploratory—warn0480 minwarn

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.

SyntaxMeaning
{{ 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 fieldFrom
idurn:wam:mesh:<domain>:<product>:<port>:v<N>
name, version<port>_v<N>, <N>.0.0
domain, dataProductdomain, name
description.purposeport 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}
slaPropertiesfreshness.sla_hours as {property: freshness, value, unit: h}
teamowner 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:

ChangeClassConsequence
Port removed, column removed, column type changed, keys changedbreakingPublish as a new port version (DP007); the old one runs until its deprecated_until.
Removed columns nobody read in 90 daysbreaking-unusedAllowed with notice.
SQL expression of an existing column changedsemanticWarning (DP062): declare a bugfix or bump the version.
New port, new column, metadata changeadditiveAllowed.
Nothing published changedinternalAllowed.