Start

Getting started

This tutorial uses the reference domain in examples/risk-data-products. Every command below runs in CI (ci.yml), so the guide stays true.

1. Install

pip install whatamesh          # or: uv tool install whatamesh · npx @whatamesh/cli
wam --version

2. Scaffold a product

wam new product risk/lapse_risk --kind consumer --owner team-risk-analytics

You get products/lapse_risk/product.yaml, sql/lapse_risk.sql and docs/README.md. Product names are snake_case (rule DP001).

3. Write the logic

Edit sql/lapse_risk.sql. Reference inputs logically, never by catalog name (DP030):

SELECT p.policy_id, p.month_end, p.product_line, score_lapse(p.features) AS lapse_probability
FROM {{ ref('policy_admin.policies@v2') }} p

List columns explicitly: SELECT * is blocked in ports (DP033).

4. Validate locally

wam validate products/lapse_risk                 # gates 1–2, offline
wam validate products/lapse_risk --format sarif  # for editors and code scanning
wam config explain products/lapse_risk tier      # where a setting comes from
wam describe products/lapse_risk                 # fill missing column descriptions

5. Preview on real data

wam preview products/lapse_risk --sample 1%      # plan a PR sandbox with pinned shallow clones

6. Open a pull request

CI runs gates 1–4: rules, contract diff, data diff, consumer expectations, test deploy, owner approval, immutable release.

7. See it in the marketplace (Enterprise)

With the Enterprise edition, the product page shows the contract, Trust Score, lineage and freshness. Consumers request access there; approval adds them to the port's reader group and access expires automatically.

Reference

  • Contract: every product.yaml field in the product.yaml reference; wam schema prints it as a JSON Schema.
  • CLI: every command and option in the CLI reference, or wam <command> --help.
  • Rules: rule types, the catalogue, policy packs and custom rules in the rulebook.