Skip to content

context enrich

The enrich command upgrades your context files from Bronze (schema-only) to Silver or Gold by adding descriptions, semantic tags, business logic, and usage guidance.

Terminal window
context enrich --target <tier>
OptionDescriptionDefault
--target <tier>Target tier: silver or goldsilver
--applyWrite changes directly to filesOff (preview mode)
--source <name>Data source name from config for sample valuesFirst configured source
--db <url>Database URL for context-aware enrichment$DATABASE_URL
--context-dir <path>Path to context files./context
Terminal window
context enrich --target silver

This prints suggested changes without modifying any files.

Terminal window
context enrich --target silver --apply
Terminal window
context enrich --target gold --apply --db postgres://localhost/myapp

Gold-tier enrichment connects to the database to sample data and generate richer metadata.

Terminal window
context enrich --target silver --apply --source analytics
  • Human-readable descriptions for tables and columns
  • Semantic type annotations (e.g., email, currency, timestamp)
  • Common query patterns
  • Column-level tags
  • Business logic documentation
  • Data quality expectations
  • Sensitive data classification (PII, PHI, financial)
  • Suggested access policies
  • Usage examples and caveats
  • Relationship descriptions with cardinality notes
model:
name: users
description: "Registered user accounts. One row per unique user."
columns:
- name: email
type: varchar(255)
description: "Primary email address, used for login and notifications."
semantic_type: email
pii: true
- name: created_at
type: timestamp
description: "Timestamp when the account was created (UTC)."