Skip to main content

DDS Syntax (Datadance Syntax)

DDS (Datadance Syntax) is a YAML-like alternative to writing transforms in JSON. It is more concise and readable, especially for complex transformations.

Writing transforms in DDS

Each line defines one transform: a field name followed by a colon and the expression.

field1: expression1
field2: expression2

Example

[
{ "fullName": "input.first + ' ' + input.last" },
{ "age": "input.age | parseInt" }
]

Using DDS with the API

Set transforms_syntax: "dds" in the settings and pass the transforms as a string:

{
"input": { "first": "Alice", "last": "Smith", "age": "30" },
"transforms": "fullName: input.first + ' ' + input.last\nage: input.age | parseInt",
"settings": { "merge_method": "overwrite", "transforms_syntax": "dds" }
}

Nested transforms in DDS

Indentation (2 spaces) defines nesting:

address:
street: upper(input.address.street)
city: upper(input.address.city)

Rules

RuleDetail
IndentationMust be in multiples of 2 spaces (no tabs)
Field namesOnly alphanumeric, underscores, and dollar signs
String literalsUse single quotes, not double quotes
Values without colonCreates a nested transform block

Converting between formats

Use the dedicated endpoints for conversion:

  • DDS → JSON: POST /api/parse with DDS text as the body
  • JSON → DDS: POST /api/encode with JSON transforms as the body