What Is YAML?
YAML (YAML Ain’t Markup Language) is a human-readable data serialization format. Unlike JSON, which uses braces and brackets, or XML, which uses angle-bracket tags, YAML relies on indentation and simple punctuation to express structure. This makes it especially well suited for configuration files that engineers need to read, review, and modify by hand. Think of YAML like a well-organized outline. Each level of indentation represents a deeper level of nesting, just as sub-bullets sit beneath their parent bullet in a document outline. The result is configuration that reads almost like natural language.Core YAML Concepts
Key-Value Pairs
The most basic YAML structure is a key-value pair, separated by a colon and a space:name, label, and width all follow this pattern.
Nesting with Indentation
YAML uses consistent indentation (spaces, never tabs) to express hierarchy. Each nested level adds the same number of spaces — typically two:key, label, and width are properties of column. This hierarchical nesting maps directly to how Powersheet organizes column definitions within a sheet configuration.
Lists (Sequences)
Lists use a dash followed by a space at the same indentation level:- introduces a new list item. In Powersheet, lists appear throughout configuration — the sources array defines which entity types a sheet queries, the columns array defines which columns appear, and the views array defines named column presets.
Strings and Quoting
Most strings in YAML do not need quotes:true, false, yes, no) or a number but you intend it as text, wrap it in quotes. Powersheet Lucene query strings almost always need quoting because they contain colons and special operators.
Comments
Comments start with# and continue to the end of the line:
YAML Structures in Powersheet
Powersheet uses two primary YAML files. Understanding how standard YAML structures map to these files builds a mental model for reading and writing any configuration.Maps of Maps (Nested Objects)
Domain model entity types use deeply nested maps to describe properties and their metadata:properties key whose value is itself a list of maps. This pattern — lists of maps containing lists of maps — is the most common structure in Powersheet YAML.
Dot-Separated Binding Paths
Powersheet uses a convention that extends standard YAML: binding paths expressed as dot-separated strings within thekey field of column definitions:
Multi-Line Strings
YAML supports multi-line strings using the pipe (|) or folded (>) syntax:
>) joins lines with spaces, creating flowing paragraphs. In Powersheet, multi-line strings are most commonly used in description fields and in Lucene query strings that span multiple lines.
Common Pitfalls
Understanding these common mistakes saves significant debugging time when working with Powersheet YAML files.| Pitfall | Symptom | Fix |
|---|---|---|
| Tab characters in indentation | Parser error, configuration fails to load | Configure editor to use spaces only |
| Missing space after colon | Key-value pair treated as single string | Always use key: value with a space |
| Inconsistent indentation depth | Child properties attach to wrong parent | Use exactly 2 spaces per nesting level |
| Unquoted special characters | Colons, brackets, or booleans misinterpreted | Quote strings containing :, {, [, true, false |
| Trailing whitespace | Invisible characters cause diff noise | Enable “trim trailing whitespace” in editor |
Before uploading a modified configuration to Polarion, validate the YAML syntax using an online YAML validator or your editor’s built-in linting. A single indentation error can prevent the entire sheet from loading, and Powersheet’s error messages may point to a downstream effect rather than the root cause.
YAML Anchors and Aliases
YAML provides a reuse mechanism through anchors (&) and aliases (*). An anchor marks a block of YAML for reuse, and an alias references it elsewhere:
_styles is a convention indicating the key exists only for anchor definitions and is not processed directly by Powersheet.
The extent of anchor and alias support may vary depending on the YAML parser version used by your Polarion installation. Test anchor-based configurations in a non-production project first.
Data Types in YAML
YAML automatically infers data types, which can occasionally produce surprises:yes, no, true, false, on, or off, always wrap them in quotes to prevent YAML from converting them to booleans.
How YAML Maps to Powersheet Concepts
The following table connects YAML structures to the Powersheet concepts they represent:| YAML Structure | Powersheet Concept | Example Key |
|---|---|---|
| Top-level list of maps | Entity type definitions | domainModelTypes |
| Nested list of maps | Relationships between entities | relationships |
List of maps with key field | Column definitions | columns |
| Map with named entries | Style definitions | styles |
| List of strings | View column visibility | views[].columns |
| Dot-separated string value | Binding path across entity relationships | columns[].key |
Editor Setup Recommendations
Choosing the right editor configuration prevents the majority of YAML errors:- Indentation: Set tab width to 2 spaces and enable “insert spaces” mode
- Syntax highlighting: Use a YAML-aware editor or install a YAML plugin for syntax coloring and bracket matching
- Linting: Enable a YAML linter that flags tab characters, inconsistent indentation, and duplicate keys
- Schema validation: Some editors support JSON Schema for YAML, which can validate Powersheet-specific keys and structures as you type
Next Steps
With a solid understanding of YAML fundamentals, you are ready to explore how Powersheet applies these concepts in practice:- YAML Configuration System explains how the two configuration files interact at runtime
- Data Model vs Sheet Configuration clarifies the boundary between what the domain model defines and what the sheet configuration controls
- Entity Types and Relationships shows how
domainModelTypesandrelationshipswork together - Sheet Configuration Guides provide step-by-step instructions for building and modifying configurations