Data Transformer Playground for Google Cloud Application Integration

Google Cloud Application Integration enables you to streamline business processes by mapping workflows in areas like lead management, procurement or supply chain management. A common requirement in these workflows is the need to transform data from one format to another due to differences in how the source and target applications store the data.

These transformations can be as simple as converting from a string to a number or constructing an Email message from fields in a request. Or they can be more complex, such as converting from one JSON object to another, converting from XML to JSON or looping through records in a CSV file.

For simple transformations, Application Integration provides the Data Mapping Editor task, which with its intuitive drag-and-drop interface, makes it easy to map data fields within your integration, eliminating the need for coding.

For more complex transformations, Application Integration’s Data Transformer Script task is recommended. The Data Transformer Script task enables you to configure the data mapping relationships between the source and target variables in your integrations. In the Data Transformer Script task, mappings are defined using the Jsonnet (https://jsonnet.org/) configuration language.

Jsonnet is a powerful language and with a library of over 100 functions, it supports everything from converting data types, manipulating strings, looping through JSON objects and arrays, to performing arithmetic and logical operations and more.

The Jsonnet language can seem daunting at first, especially if you don’t have a software development background, and many of our users go through multiple trial and error iterations when configuring their data mappings.

To ease this learning process and accelerate workflow development, the Data Transformer Playground (https://datatransformer-playground.web.app/) has been developed. The Data Transformer Playground is a free-to-use, community supported, web application that enables users to develop and test their Jsonnet data mapping scripts without needing to build and execute workflows within Application Integration. 

 
andyhood_0-1711151336051.png

The Data Transformer Playground supports all of the Jsonnet standard library functions as well as Application Integration’s additional library functions. These extend the core capabilities with support for parsing CSV and XML files, formatting dates and more. And similar to how Input Variables are defined in Application Integration, the Data Transformer Playground allows users to define variables that will be available when the Jsonnet script is run.

To help users in writing Jsonnet scripts, the Data Transformer Playground provides full Jsonnet language support, including syntax highlighting, smart completions, code snippets and document formatting. It also includes many example templates covering common data mapping scenarios. And to further aid development, the Data Transformer Playground supports debug tracing using Jsonnet’s built-in std.trace() function.

The Data Transformer Playground allows users to create multiple ‘playgrounds’, with each playground being a combination of scripts and input variables. Playground files can be exported and shared with other users to foster collaboration.

On a final note, whilst every effort has been made to ensure that Jsonnet scripts developed in the Data Transformer Playground are compatible with Application Integration, users should still test their scripts in an Application Integration workflow to ensure that they provide the same results.

Contributors
Version history
Last update:
‎03-22-2024 04:58 PM
Updated by: