Semaphor
Semantic Domains

Getting Started

Step-by-step tutorial for writing semantic domain templates by hand or programmatically

Semantic domains can be built through the UI or by writing YAML/JSON templates directly. This guide walks you through building a complete domain template from scratch, one concept at a time.

When to use template editing:

  • Bulk configuration of many fields or datasets
  • Version-controlled domains stored in Git
  • CI/CD pipelines that deploy domain changes automatically
  • Copying configurations between environments
  • AI agents or scripts generating domains programmatically

How to access the Code Editor:

  1. Open your domain in the Domain Editor
  2. Click the Code Editor tab
  3. Toggle between YAML and JSON format
  4. Edit the template and click Save

Minimal Template

The smallest valid domain template:

schemaVersion: "2.0"
datasets: []

All other top-level fields are optional and default to empty. The full skeleton:

schemaVersion: "2.0"
datasets: []
relationships: []
calculatedMetrics: {}
calculatedDimensions: {}
grainMappings: []

Guide Sections

On this page