Saving Compound Actions

When saving your compound action, you might get a compilation error. This guide covers common authoring mistakes

Multi-line inputs

When writing script actions, you may want to use multiple lines. The full compound action gets parsed as YAML, so make sure you add a vertical bar and then write your code normally.

script:
  code: |
    a = 1
    b = 2
    a + b

DSL Escaping

In our Data Mapper language, every input gets parsed as a DSL string. So numeric and boolean constants need to be quoted as follows

integer_value: '2'
decimal_value: '12.34'
boolean_value: 'true'

Additionally, because we use YAML as the authoring language we have to write constants to circumvent built-in yaml syntax. This means you need an extra set of quotes surrounding string/list/object constants

string_value: '"abc"'
list_value: '[1, 2, 3, "abc"}'
object_value: '{"a": "b", "c": 123}'

If you don't like managing those quotes yaml also makes it pretty easy to do this outer wrapping using the block quote syntax

string_value: >
  "abc"
list_value: >
  [1, 2, 3, "abc"]
object_value: >
  {"a": "b", "c": 123}