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.
- 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 "google.com" 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
The Airscript expression that will be run when this Operation is executed. This can include any Variables from this Data Flow.
This has 3 options:
- 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.
- 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.
- The result of the Airscript expression must be a Text value. The value is not changed in any way by choosing XML.
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.
Was this article helpful?
Articles in this section
- Data Operation Overview
- The Transform Data Operation
- AirData Request Data Operation
- The Google Data Operation
- The Zendesk Data Operation
- The Salesforce Data Operation
- The Delete Assets Data Operation
- The Fetch Asset Details Data Operation
- The XML to JSON Data Operation
- The Fill PDF Form Data Operation