Transform

Overview

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.

organizing info

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 urlby using the Transform Expression "google.com"with urlas 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.