Orchestration
...
Native Actions
Using the Transform Data Native Action
13 min
data transformation, such as converting data into specific formats, has traditionally required expertise in python or jsonata however, with swimlane turbine, you can achieve these tasks easily using the transform data native action within a playbook, without the need for complex coding overview the transform data native action allows you to modify and manipulate data efficiently within your playbooks whether you need to reformat, extract, or combine data, this action provides a user friendly interface to achieve these tasks, enabling seamless automation without requiring advanced coding skills key benefits of the transform data action no coding required perform complex data transformations without writing python or jsonata code visual transformation builder a user friendly interface that simplifies data manipulation versatility supports various transformation types to cater to different data processing needs efficiency streamlines data handling processes, reducing the time required to implement transformations setting up the transform data native action you’ve already created your playbook, and now you’re ready to transform the data from a property here’s how to set up the basic transformation from the add panel, drag and drop the transform action onto the playbook canvas select transform data and then click configure the transformation builder window will open if your data has any sensitive information, you can mark as sensitive by clicking the contains sensitive data checkbox the data is not shown in the ui or in the logs you can rename the transformation block by clicking the pencil icon swimlane automatically updates the block name in snake case if you wish to duplicate the block, click the icon if you click apply and later return to rename the block, the original name will not change to rename the block, click the lock icon to unlock it for editing renaming the block could potentially break downstream actions if the block is referenced or used elsewhere in the playbook a warning dialog will appear to remind you of this risk configuring the transformation follow these steps to configure the transformation in block 1, on the first line, click the select a transformation drop down to choose a transformation type once the configuration is complete, click transform again to apply additional transformations if needed the next line in the block will be then you can select additional transformation actions to apply to the output of the previous transformation tip if you are fetching data from a json field using a record trigger or record search, remember that the result will appear as a string to transform this data as json, use the json parse transformation before performing any additional operations examples example 1 extracting data from a json object scenario you receive data in json format and need to extract specific fields for further processing drag and drop the transform data action onto the playbook canvas configure the transformation to extract the desired data first select extract from the transformation type drop down then use a path to navigate to the specific json fields (e g , $ user name ) output the extracted data is ready for subsequent actions example 2 concatenating strings scenario combine a user's first and last name into a single string drag and drop the transform data action configure the transformation first select concatenate then provide the input fields for first name and last name , and specify a space ( " " ) as the separator output a single string containing the full name (e g , "john doe") example 3 converting data types scenario convert a number (e g , 12345 ) into a string for use in a text field add the transform data action to the playbook configure the transformation first select convert then choose number to string output the number 12345 is converted into the string "12345" example 4 filtering array elements scenario filter an array to include only items that meet specific criteria (e g , users older than 18) use the transform data action configure the transformation first select filter then specify the condition (e g , age > 18 ) output an array containing only users older than 18 example 5 transforming date formats scenario convert a date from yyyy mm dd to mm/dd/yyyy drag and drop the transform data action configure the transformation first select format date then set the input format ( yyyy mm dd ) and the output format ( mm/dd/yyyy ) output the date is reformatted to the desired format best practices start simple begin with basic transformations and progressively add complexity as needed test transformations test each transformation step to ensure accuracy before applying subsequent actions keep track of changes document the purpose and expected outcome of each transformation block for easier maintenance avoid overcomplicating use clear and straightforward transformations to ensure maintainability use cases for more practical applications, explore the transform data use case