Articles in this section

Transformation 1.0

Transformation 1.0 rules help you transform extensive export or import JSON data into more manageable JSON structures that are readable and easier to understand. You can use this feature to

  • flatten complex JSON structures.
  • provide meaningful field names.
  • remove all but a limited set of fields for processing in a flow.

Example: If the field names in your export data differ from the field names required by your destination app, you could apply a transform to the data exported from your source application that would rename those fields before sending the data to the import.

Important: In Transformation 1.0, you must extract all the fields you want to keep, even if you only modify one. Only the fields listed in the Output section of the AFE will be included in the final record.

Transformation options

There are two different options when transforming data. Each offers a different view and options for transforming data.

Transformation 1.0

Transformation 1.0 is the original view for transforming data. There are three windows in a transformation panel:

  • Rules – Determines how you will transform your records.
    • Left column – Lists all the available fields in your export data.
    • Right column – Create or modify your available fields to flatten complex JSON structures, provide meaningful field names, or remove all but a limited set of fields for processing in a flow.
  • Input – Displays a complete sample of your exported data.
  • Output – Displays the final version of your transformed data.

Transformations example.png

JavaScript

The JavaScript-based tool is recommended if you need to perform complex transformations. You can use the toggle button on the top of the transformations screen to move between the standard Rules and the JavaScript editor.

JS.png

Toggling between transformation options

You can toggle between transformation options, but in most cases, saving settings in one transformation option will override the others. For example, any changes made to JavaScript will erase everything in 1.0 rules.

Apply a transform

Use the following steps to apply a transform to a flow step.

  1. In Flow Builder, click + and select the transform icon. The Define transformation advanced field editor (AFE) opens.
SpaceX_export_with_transformation_descsription.pngtransformations_in_an_import.pngTransformations in an export and import
  1. Toggle between Transformation 1.0 and JavaScript.
  2. Add your transformations.
  3. When your data meets the requirements for the next step in your flow, click Save & close.

Note: If Auto preview is enabled, the results of your transform configuration immediately display in the Output section of the AFE.

Important: You must extract all of the fields you want to keep, even if you only modify one of them. Only the fields listed under in the Output section of the AFE will be included in the final record. 

 

Was this article helpful?
1 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.