Data Mapping task

TheData Mapping task lets you perform variable assignments in your integration, get and set properties of json objects, and apply nested transform functions to values. The variables can be integration variables or task variables.

For example, you can assign values from an integration variableX to a task variableY or from a task variableY to an integration variableX. For more information about variables in Application Integration, see Using variables in Application Integration.

Configure the Data Mapping task

To configure aData Mapping task, perform the following steps:

  1. In the Google Cloud console, go to theApplication Integration page.

    Go to Application Integration

  2. In the navigation menu, clickIntegrations.

    TheIntegrations page appears listing all the integrations available in the Google Cloud project.

  3. Select an existing integration or clickCreate integration to create a new one.

    If you are creating a new integration:

    1. Enter a name and description in theCreate Integration pane.
    2. Select a region for the integration.Note: TheRegions dropdown only lists the regions provisioned in your Google Cloud project. To provision a new region, clickEnable Region. SeeEnable new region for more information.
    3. Select a service account for the integration. You can change or update the service account details of an integration any time from theIntegration summary pane in the integration toolbar.Note: The option to select a service account is displayed only if you have enabled integration governance for the selected region.
    4. ClickCreate. The newly created integration opens in theintegration editor.

  4. In theintegration editor navigation bar, clickTasks to view the list of available tasks and connectors.
  5. Click and place theData Mapping element in the integration editor.
  6. Click theData Mapping element on the designer to view theData Mapping task configuration pane.
  7. ClickOpen Data Mapping Editor to view the default values of the task and to add a new mapping. For detailed steps about adding a mapping, seeAdd a mapping.

    For more information about the data mapping editor layout, see Data mapping overview.

Add a mapping

To add a mapping, perform the following steps:

  1. In the Data Mapping task configuration pane, clickOpen Data Mapping Editor.
  2. Configure the mappingInput:Input: Source of the data mapping input. Source can be a literal value, a base function, or an input variable, with mapping functions.
    1. Drag a variable or its subfield from theVariables list into theInput row. To view the available subfields of a variable, click(Expand) next to that variable in theVariables list.
    2. Alternatively, In theInput row, clickVariable or Value and do the following:
    3. Click+ (Add a function) on any input variable, value, or base function in theInput row to add a mapping function from the list of available mapping functions. A mapping function can have one or more parameters. Each parameter can further have a value, a variable, or a base function followed by a chain of mapping functions.
      • To add a nested function, click+ (Add a function) next to the parameter of the function. Similarly, to remove or delete the most recently added function, click- (Delete previous function).
      • To add, remove, or change a function in-between a mapping expression, click on a function and selectAdd Function,Remove Function, orChange Function respectively from the drop-down menu.
      • To know more about mapping functions, seemapping functions.

        For information about the supported mapping functions, see Supported data types and mapping functions.

      • To remove a variable inside a mapping expression, click(Remove) next to the variable row.
      • To remove the entireInput row, click(Clear) on the row.
  3. Configure the mappingOutput:Output: Target variable for the data mapping output. Target variables can be used for mapping in subsequent input rows.
    1. Drag a variable from theVariables list into theOutput row. If the variable is not available, then clickcreate a new one to configure the name and data type of the new variable. Optionally, you can click the output variable and select whether to use that variable as an output of the integration, or as an input to another integration.
    2. To remove the output variable, click(Clear).
  4. (Optional) To delete a mapping row, click(Delete this mapping).
  5. Close theData Mapping Editor once your mapping is complete. Any changes will be autosaved.

The completed data mapping is available to view from theData Mapping task configuration pane, as shown in the following image:

image showing data mapping editorimage showing data mapping editor

Supported data types and mapping functions

Application Integration supports the following data types for variables in theData Mapping task:

The following table lists the data mapping functions available for each of the data types.
Data typeSupported mapping functions
BooleanAND,EQUALS,NAND,NOR,NOT,OR,TO_JSON,TO_STRING,XNOR,XOR
Boolean arrayAPPEND,APPEND_ALL,CONTAINS,FILTER,FOR_EACH,GET,REMOVE,REMOVE_AT,SET,SIZE,TO_JSON,TO_SET
DoubleADD,DIVIDE,CEIL,EQUALS,EXPONENT,GREATER_THAN,GREATER_THAN_EQUAL_TO,FLOOR,LESS_THAN,LESS_THAN_EQUAL_TO,MOD,MULTIPLY,ROUND,SUBTRACT,TO_JSON,TO_STRING
Double arrayAPPEND,APPEND_ALL,AVG,CONTAINS,FILTER,FOR_EACH,GET,MAX,MIN,REMOVE,REMOVE_AT,SET,SIZE,SUM,TO_JSON,TO_SET
IntegerADD,DIVIDE,EPOCH_TO_HUMAN_READABLE_TIME,EQUALS,EXPONENT,GREATER_THAN,GREATER_THAN_EQUAL_TO,LESS_THAN,LESS_THAN_EQUAL_TO,MOD,MULTIPLY,SUBTRACT,TO_DOUBLE,TO_JSON,TO_STRING
Integer arrayAPPEND,APPEND_ALL,AVG,CONTAINS,FILTER,FOR_EACH,GET,MAX,MIN,REMOVE,REMOVE_AT,SET,SIZE,SUM,TO_JSON,TO_SET
JSONAPPEND_ELEMENT,FLATTEN,FILTER,FOR_EACH,GET_ELEMENT,GET_PROPERTY,MERGE,REMOVE_PROPERTY,RESOLVE_TEMPLATE,SET_PROPERTY,SIZE,TO_BOOLEAN,TO_BOOLEAN_ARRAY,TO_DOUBLE,TO_DOUBLE_ARRAY,TO_INT,TO_INT_ARRAY,TO_STRING,TO_STRING_ARRAY
StringCONCAT,CONTAINS,DECODE_BASE64_STRING,EQUALS,EQUALS_IGNORE_CASE,LENGTH,REPLACE_ALL,RESOLVE_TEMPLATE,SPLIT,SUBSTRING,TO_BASE_64,TO_BOOLEAN,TO_DOUBLE,TO_INT,TO_JSON,TO_LOWERCASE,TO_UPPERCASE
String arrayAPPEND,APPEND_ALL,CONTAINS,FILTER,FOR_EACH,GET,REMOVE,REMOVE_AT,SET,SIZE,TO_JSON,TO_SET
For more information about each of the data mapping functions, see
Data Mapping Functions Reference.

Supported base functions

The following table lists the data mapping base functions available:
Data typeSupported base functions
IntegerNOW_IN_MILLIS
Integer arrayINT_LIST
StringGENERATE_UUID,GET_EXECUTION_ID,GET_INTEGRATION_NAME,GET_INTEGRATION_REGION,GET_PROJECT_ID
For more information about each of the data mapping base functions, seeData Mapping Functions Reference.

Best practices

Using theData Mapping task can be a powerful way to transform and pass key variables to various tasks in your integration. Here are a few tips to keep in mind as you build your integration:

  • Mappings are run in sequence from top to bottom. That is, if input variableA is mapped to an output variableB in the first row, the variableB is available for mapping in the subsequent rows.
  • In each row, the data type of theInput row must match the data type of theOutput row. To cast between types, use transformation functions such asTO_STRING andTO_INT.
  • There are no limitations on the length of transformation chaining. However, debugging large chained transformations can be difficult. We recommend keeping input transformations readable and splitting complex transformations into multiple mappings.
  • If a mapping requires a fallback value, set a fallback value for the mapping. If you do not provide a fallback value, the mapping returns an error when the input value or transformation returnsnull.
  • When deleting a variable, make sure to delete any mapping that contains it.

For information about the usage limits that apply to theData Mapping task, see Usage limits.

Considerations

For JSON variables, based on a JSON schema, Application Integration interprets the child property of the variable as a JSON type in the following cases:

  • If the child property's type specifies null. For example:
    {"properties":{"PersonID":{"type":["double","null"],"readOnly":false}}}
  • If the child property's type specifies multiple data types. For example:
    {"properties":{"PersonID":{"type":["integer","string","number"],"readOnly":false}}}

In these cases, using the data mapping functions, you must explicitly convert the child variables to the desired type.

The following examples illustrate the various types of property declarations and show how to use the data mapping functions to get the desired type:

Example 1

{"type":"object","properties":{"dbIntegers":{"type":"array","items":{"type":["integer","null"]}},"dbBooleans":{"type":["array"],"items":{"type":"boolean"}}}}
Application Integration interpretsdbIntegers as a JSON type, anddbBooleans as a BOOLEAN_ARRAY type.

To convertdbIntegers use:

dbIntegers.TO_INT_ARRAY()

Example 2

{"type":"object","properties":{"dbId":{"type":["number","null"],"readOnly":false},"dbStatus":{"type":["boolean","null"],"readOnly":false}}}
Application Integration recognises bothdbId anddbStatus as JSON types, butdbId is a parameter that can take a single double value or a null value, anddbStatus is a parameter that can take a single boolean value or a null value.

To convertdbId anddbStatus use:

dbId.TO_DOUBLE()
dbStatus.TO_BOOLEAN()

Example 3

{"type":"object","properties":{"dbString":{"type":["string"],"readOnly":false}}}
Application Integration recognisesdbString as a string type.

Error handling strategy

An error handling strategy for a task specifies the action to take if the task fails due to atemporary error. For information about how to use an error handling strategy, and to know about the different types of error handling strategies, seeError handling strategies.

Quotas and limits

For information about quotas and limits, seeQuotas and limits.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.