How to use Alumio syntax? [ &{@}, ${variable}, $2 ]

What syntax does Alumio have to offer?

  • When using Alumio you want to grab different types of data.
  • Depending on what that data is, different syntax is required.

Here’s a short list of available syntax within the Alumio iPaaS:

  • ${variable}

    • By using “${” followed by a variable name you can access the system variables you’ve created within Alumio.
  • &{object.some_key}

    • By using “&{” followed by the path within your input data, you can use the data almost anywhere, not just in transformers but also in outgoing’s for example.
    • If you have numerical keys such as {“0”:“foo”, “1”:“bar”}, you can access these by escaping.
      Like so image
  • &{@}

    • By using “&{@}” you can access (copy) all available data.
  • &{@.object.some_key}

    • Mainly used within a HTTP transformer to access the retrieved data.
  • $0 or $1 etc

    • By using “$” followed by a number you can access registers. Mainly in certain transformers, commonly found when using regular expressions for example.
  • ?{}

    • By using “&{}” syntax, it’s possible to find a reference in the object. If the syntax can’t find it, then the transformer/subscriber/…etc will fail, because an error is thrown. With the “?{}” syntax, instead, the transformer/subscriber/… etc won’t fail, and null will simply be inserted as a value instead.

Most of these can also be found in the ‘pre configuration’ that’s shipped with your new Alumio environment.

Logic

You can also use logic while filling or setting fields.
For example by using || you can check if a variable exists.
By writing &{foo || ‘’} you check if ‘foo’ exists, if yes it uses the value of ‘foo’.
If not it sets an empty string.

JMESPath gives you many options to include logic in your getters and setters. Do check it out!

Pictures

Because everyone likes pictures, here are some examples.

However, not every syntax is supported by placeholder.

The placeholders represent the values that the reader will need to alter when they employ the sample data. The placeholders in the example output can also show other values that change. A placeholder usually has a name that is descriptive and a default value.

Please pay attention, that placeholders support “&{}” and depending on the version “?{}” syntax.

More information, including a video can be found in this topic.

1 Like