# Data Mapping task

The **Data 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 variable `X`
to a task variable `Y` or from a task variable `Y` to an integration
variable `X`. For more information about variables in Application Integration,
see [Using variables
in Application Integration](https://docs.cloud.google.com/application-integration/docs/variables-overview).

## Configure the Data Mapping task

To configure a **Data Mapping** task, perform the following steps:

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

   [Go to Application Integration](https://console.cloud.google.com/integrations)
2. In the navigation menu, click **Integrations** .


   The **Integrations** page appears listing all the integrations available in the Google Cloud project.
3. Select an existing integration or click **Create integration** to create a new one.


   If you are creating a new integration:
   1. Enter a name and description in the **Create Integration** pane.
   2. Select a region for the integration.

      > [!NOTE]
      > **Note:** The **Regions** dropdown only lists the regions provisioned in your Google Cloud project. To provision a new region, click **Enable Region** . See [Enable new region](https://docs.cloud.google.com/application-integration/docs/enable-new-region.md.txt) 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 the **Integration summary** pane in the integration toolbar.

      > [!NOTE]
      > **Note:** The option to select a service account is displayed only if you have enabled integration governance for the selected region.

   4. Click **Create** . The newly created integration opens in the *integration editor*.


4. In the *integration editor* navigation bar, click **Tasks** to view the list of available tasks and connectors.
5. Click and place the **Data Mapping** element in the integration editor.
6. Click the **Data Mapping** element on the designer to view the **Data Mapping** task configuration pane.
7. Click **Open Data Mapping Editor** to view the default values of the task and to add a new mapping. For detailed steps about adding a mapping, see [Add a mapping](https://docs.cloud.google.com/application-integration/docs/configure-data-mapping-task.md.txt#add-map).

   For more information about the data mapping editor layout, see [Data mapping overview](https://docs.cloud.google.com/application-integration/docs/data-mapping-overview.md.txt).

## Add a mapping

To add a mapping, perform the following steps:

1. In the Data Mapping task configuration pane, click **Open Data Mapping Editor**.
2. Configure the mapping ***Input*** :

   > [!IMPORTANT]
   > ***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 the **Variables** list into the *Input* row. To view the available subfields of a variable, click **(Expand)** next to that variable in the **Variables** list.
   2. Alternatively, In the *Input* row, click **Variable or Value** and do the following:
      - Select **Variable** to search and use an existing variable. To create a new variable, click **+ Add new variable**, and enter the name and data type of the new variable.
      - Select **Value** to enter a literal value of type `string`, `integer`, `double`, or `Boolean`).
      - Select **Function** to search and use a base function.


        A base function is used to retrieve or generate values during the execution of an integration. For example, generating a random UUID or retrieving the current integration region. For information about the supported base functions, see [Supported base functions](https://docs.cloud.google.com/application-integration/docs/configure-data-mapping-task.md.txt#basefunction).
      - Click **Save**.
   3. Click **+ (Add a function)** on any input variable, value, or base function in the *Input* 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 select **Add Function** , **Remove Function** , or **Change Function** respectively from the drop-down menu.
      - To know more about mapping functions, see [mapping functions](https://docs.cloud.google.com/application-integration/docs/data-mapping-overview.md.txt#mapping-functions).
      - For information about the supported mapping functions, see [Supported data types and mapping functions](https://docs.cloud.google.com/application-integration/docs/configure-data-mapping-task.md.txt#datatype_and_mappingfunction).
      - To remove a variable inside a mapping expression, click **(Remove)** next to the variable row.
      - To remove the entire *Input* row, click **(Clear)** on the row.
3. Configure the mapping ***Output*** :

   > [!IMPORTANT]
   > ***Output***: Target variable for the data mapping output. Target variables can be used for mapping in subsequent input rows.

   1. Drag a variable from the **Variables** list into the *Output* row. If the variable is not available, then click **create 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 the **Data Mapping Editor** once your mapping is complete. Any changes will be autosaved.

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


![image showing data mapping editor](https://docs.cloud.google.com/static/application-integration/images/data-map-with-int.png)
![image showing data mapping editor](https://docs.cloud.google.com/static/application-integration/images/data-map-with-int.png)

## Supported data types and mapping functions

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

- String and String array
- Integer and Integer array
- Double and Double array
- Boolean and Boolean array
- JSON

The following table lists the data mapping functions available for each of the data types.

| Data type | Supported mapping functions |
|---|---|
| Boolean | [AND](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#and-function), [EQUALS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#equals-function), [NAND](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#nand-function), [NOR](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#nor-function), [NOT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#not-function), [OR](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#or-function), [TO_JSON](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_json-function), [TO_STRING](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_string-function), [XNOR](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#xnor-function), [XOR](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#xor-function) |
| Boolean array | [APPEND](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append-function), [APPEND_ALL](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append_all-function), [CONTAINS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#contains-function), [FILTER](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#filter-function), [FOR_EACH](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#foreach-function), [GET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#get-function), [REMOVE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove-function), [REMOVE_AT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove_at-function), [SET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#set-function), [SIZE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#size-function), [TO_JSON](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_json-function), [TO_SET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_set-function) |
| Double | [ADD](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#add-function), [DIVIDE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#divide-function), [CEIL](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#ceil-function), [EQUALS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#equals-function), [EXPONENT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#exponent-function), [GREATER_THAN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#greater_than-function), [GREATER_THAN_EQUAL_TO](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#greater_than-equal-to-function), [FLOOR](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#floor-function), [LESS_THAN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#less_than-function), [LESS_THAN_EQUAL_TO](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#less_than_equal_to-function), [MOD](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#mod-function), [MULTIPLY](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#multiply-function), [ROUND](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#round-function), [SUBTRACT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#subtract-function), [TO_JSON](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_json-function), [TO_STRING](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_string-function) |
| Double array | [APPEND](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append-function), [APPEND_ALL](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append_all-function), [AVG](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#avg-function), [CONTAINS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#contains-function), [FILTER](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#filter-function), [FOR_EACH](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#foreach-function), [GET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#get-function), [MAX](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#max-function), [MIN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#min-function), [REMOVE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove-function), [REMOVE_AT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove_at-function), [SET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#set-function), [SIZE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#size-function), [SUM](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#sum-function), [TO_JSON](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_json-function), [TO_SET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_set-function) |
| Integer | [ADD](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#add-function), [DIVIDE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#divide-function), [EPOCH_TO_HUMAN_READABLE_TIME](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#epoch_to_human_readable_time-function), [EQUALS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#equals-function), [EXPONENT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#exponent-function), [GREATER_THAN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#greater_than-function), [GREATER_THAN_EQUAL_TO](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#greater_than-equal-to-function), [LESS_THAN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#less_than-function), [LESS_THAN_EQUAL_TO](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#less_than_equal_to-function), [MOD](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#mod-function), [MULTIPLY](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#multiply-function), [SUBTRACT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#subtract-function), [TO_DOUBLE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_double-function), [TO_JSON](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_json-function), [TO_STRING](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_string-function) |
| Integer array | [APPEND](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append-function), [APPEND_ALL](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append_all-function), [AVG](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#avg-function), [CONTAINS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#contains-function), [FILTER](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#filter-function), [FOR_EACH](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#foreach-function), [GET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#get-function), [MAX](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#max-function), [MIN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#min-function), [REMOVE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove-function), [REMOVE_AT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove_at-function), [SET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#set-function), [SIZE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#size-function), [SUM](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#sum-function), [TO_JSON](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_json-function), [TO_SET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_set-function) |
| JSON | [APPEND_ELEMENT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append-element-function), [FLATTEN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#flatten-function), [FILTER](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#filter-function), [FOR_EACH](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#foreach-function), [GET_ELEMENT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#get_element-function), [GET_PROPERTY](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#get_property-function), [MERGE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#merge-function), [REMOVE_PROPERTY](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove_property-function), [RESOLVE_TEMPLATE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#resolve_template-function), [SET_PROPERTY,](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#set_property-function)[SIZE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#size-function), [TO_BOOLEAN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_boolean-function), [TO_BOOLEAN_ARRAY](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_boolean_array-function), [TO_DOUBLE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_double-function), [TO_DOUBLE_ARRAY](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_double_array-function), [TO_INT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_int-function), [TO_INT_ARRAY](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_int_array-function), [TO_STRING](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_string-function), [TO_STRING_ARRAY](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_string_array-function) |
| String | [CONCAT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#concat-function), [CONTAINS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#contains-function), [DECODE_BASE64_STRING](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#decode_base64_string-function), [EQUALS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#equals-function), [EQUALS_IGNORE_CASE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#equals_ignore_case-function), [LENGTH](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#length-function), [REPLACE_ALL](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#replace_all-function), [RESOLVE_TEMPLATE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#resolve_template-function), [SPLIT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#split-function), [SUBSTRING](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#substring-function), [TO_BASE_64](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_base-64-function), [TO_BOOLEAN](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_boolean-function), [TO_DOUBLE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_double-function), [TO_INT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_int-function), [TO_JSON](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_json-function), [TO_LOWERCASE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_lowercase-function), [TO_UPPERCASE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_uppercase-function) |
| String array | [APPEND](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append-function), [APPEND_ALL](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#append_all-function), [CONTAINS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#contains-function), [FILTER](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#filter-function), [FOR_EACH](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#foreach-function), [GET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#get-function), [REMOVE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove-function), [REMOVE_AT](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#remove_at-function), [SET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#set-function), [SIZE](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#size-function), [TO_JSON](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_json-function), [TO_SET](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#to_set-function) |

For more information about each of the data mapping functions, see [Data Mapping Functions Reference](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#mapping-funcs).

## Supported base functions

The following table lists the data mapping base functions available:

| Data type | Supported base functions |
|---|---|
| Integer | [NOW_IN_MILLIS](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#now-in-millis-function) |
| Integer array | [INT_LIST](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#int-list-function) |
| String | [GENERATE_UUID](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#uuid-function), [GET_EXECUTION_ID](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#exec-id-function), [GET_INTEGRATION_NAME](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#ip-name-function), [GET_INTEGRATION_REGION](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#ip-region-function), [GET_PROJECT_ID](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#project-id-function) |

For more information about each of the data mapping base functions, see [Data Mapping Functions Reference](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt#base-funcs).

## Best practices

Using the **Data 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 variable `A` is mapped to an output variable `B` in the first row, the variable `B` is available for mapping in the subsequent rows.
- In each row, the data type of the *Input* row must match the data type of the *Output* row. To cast between types, use transformation functions such as `TO_STRING` and `TO_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 returns `null`.
- When deleting a variable, make sure to delete any mapping that contains it.

For information about the usage limits that apply to the **Data Mapping** task, see [Usage limits](https://docs.cloud.google.com/application-integration/docs/quotas.md.txt#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:

  ```json
  {
    "properties": {
      "PersonID": {
        "type": [
          "double",
          "null"
        ],
        "readOnly": false
      }
    }
  }
  ```
- If the child property's type specifies multiple data types. For example:

  ```json
  {
    "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

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


To convert `dbIntegers` use:

```
dbIntegers.TO_INT_ARRAY()
```

### Example 2

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


To convert `dbId` and `dbStatus` use:

```
dbId.TO_DOUBLE()
```

```
dbStatus.TO_BOOLEAN()
```

### Example 3

```json
{
  "type": "object",
  "properties": {
    "dbString": {
      "type": [
        "string"
      ],
      "readOnly": false
    }
  }
}
```
Application Integration recognises `dbString` 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 a [temporary error](https://docs.cloud.google.com/application-integration/docs/error-handling.md.txt). For information about how to use an error handling strategy, and to know about the different types of error handling strategies, see [Error handling strategies](https://docs.cloud.google.com/application-integration/docs/error-handling-strategy.md.txt).

## Quotas and limits

For information about quotas and limits, see [Quotas and limits](https://docs.cloud.google.com/application-integration/docs/quotas.md.txt).

## What's next

- Learn about [all tasks and triggers](https://docs.cloud.google.com/application-integration/docs/all-triggers-tasks.md.txt).
- Learn about [Data Mapping task functions](https://docs.cloud.google.com/application-integration/docs/data-mapping-functions-reference.md.txt)
- Learn how to [test and publish an integration](https://docs.cloud.google.com/application-integration/docs/test-publish-integrations.md.txt).

- Learn about [error handling](https://docs.cloud.google.com/application-integration/docs/error-handling-strategy.md.txt).
- Learn about [integration execution logs](https://docs.cloud.google.com/application-integration/docs/introduction-logs.md.txt).