Skip to main content

Annotations contract.

Annotations describe the table and its fields. They are catalog/governance metadata, not ingestion behavior. Use them for descriptions, aliases, tags, PII classification and lifecycle metadata.

Complete example

_metadata:
contract_version: 1.0.0

policy: warn
table:
description: Curated customer dimension used by CRM analytics.
aliases: [clients, account holders]
tags:
domain: crm
data_product: customer360
contains_pii: "true"
deprecated:
since: "2026-05-01"
replacement: s_customers_v2
removal_date: "2026-12-31"
columns:
customer_id:
description: Stable customer business key.
aliases: [client_id]
tags:
key: "true"
required: "true"
email:
description: Customer email used for contactability analysis.
pii:
enabled: true
type: email
sensitivity: restricted
tags:
confidentiality: restricted
legacy_code:
description: Legacy identifier kept for reconciliation.
deprecated:
since: "2026-05-01"
replacement: customer_id

In bundle mode, the matching *.ingestion.yaml owns the target table. Keep target out of the annotations file unless you intentionally want an explicit compatibility assertion.

Fields

FieldTypeDefaultUse
_metadataobjectFile metadata for audit and bundle checks.
targetobjectoptionalOptional compatibility check against the ingestion target.
target.catalogstringingestion catalogExpected catalog.
target.schemastringingestion physical schemaExpected schema.
target.tablestringingestion target tableExpected table.
policyfail | warn | ignorewarnFailure behavior when applying annotations.
tableobjectTable-level annotations.
table.descriptionstring | nullnullTable comment/description.
table.aliasesstring | list[string][]Alternative business names.
table.tagsobject[string,string]Catalog tags. Values are normalized to strings.
table.deprecatedobject | nullnullLifecycle metadata for a deprecated table.
columnsobjectColumn annotations keyed by physical column name.
columns.*.descriptionstring | nullnullColumn comment/description.
columns.*.aliasesstring | list[string][]Alternative business names for the column.
columns.*.tagsobject[string,string]Column tags. Common examples: key, required, confidentiality.
columns.*.piiobject | nullnullPII classification.
columns.*.pii.enabledbooleantrue when pii existsWhether the column contains PII.
columns.*.pii.typeenumunknownaddress, bank_account, birth_date, credit_card, device_id, document, email, financial, health, ip_address, name, national_id, other, phone, ssn, tax_id, unknown.
columns.*.pii.sensitivityenuminternalpublic, internal, restricted, confidential.
columns.*.deprecatedobject | nullnullLifecycle metadata for a deprecated column.
deprecated.sincestringrequired when deprecated existsDate or version where deprecation starts.
deprecated.replacementstringrequired when deprecated existsReplacement table or column.
deprecated.removal_datestring | nullnullPlanned removal date.