The Transform Data Operation The Transform Data Operation

The Transform Data Operation

Elliot Fiske Elliot Fiske


The Transform Data Operation is an incredibly flexible operation with a wide variety of uses. It runs a single Airscript expression and saves the result to an output Variable. One common use case is to process the data from an HTTP Request and save it in Object-Service.


Use Cases

  • Process data from an API request to parse out only the relevant data for the rest of the Data Flow to consume.
  • Set an initial state for a Variable. For instance, you could set the initial value of a Variable called url by using the Transform Expression "" with url as the name of the Transform's result.
  • Use a Query Expression to easily parse information from a list.
  • Set a default value for a Variable that might be NULL. For instance, you could use this Airscript expression to default to "No Name" if the name Variable is NULL:
    • IF(name = NULL, "No Name", name) 
  • Set up a Variable to reuse throughout the rest of the Data Flow. For instance, to easily use a URL in several HTTP Request steps, you could set the URL to a Variable with a Transform step.

Data Operation Properties

Transform Expression

The Airscript expression that will be run when this Operation is executed. This can include any Variables from this Data Flow.

Output Format

This has 3 options:

  • Variable
    • The result of the Airscript expression will be saved to the Variable of the specified type. For instance, if the Variable type is "Number", the Airscript expression must return a Number.
  • JSON
    • The result of the Airscript expression will be saved to the output Variable as JSON. This is the same as calling TO_JSON on the output.
  • XML
    • The result of the Airscript expression must be a Text value. The value is not changed in any way by choosing XML.

Further Reading

To start using Airscript to parse data to fit your needs, read Airscript Quick Start.

To learn about data and how to use it in Airkit, read Working with Data.