// This module is included in the following assemblies:
// as_mapping-data.adoc

[id='troubleshooting-data-mapping_{context}']
= Troubleshooting data mapping

The data mapper displays the largest possible set of source fields that 
can be provided by the previous integration step. However, not all 
connections provide data in each displayed source field. For example, 
a change to a third-party application might discontinue providing data 
in a particular field. As you create an integration, if you notice that 
data mapping is not behaving as you expect, ensure that the source field 
that you want to map contains the data that you expect.

A data shape change that affects a field that is already mapped 
might prevent the data mapper from loading a document. In this 
situation, when you try to edit a data mapper step that maps the 
affected field, the data mapper cannot display the source and 
target panels. Instead, it displays an error that indicates 
that it cannot load or cannot find the document. The error 
message looks like one of the following messages: 

* `Data Mapper UI Initialization Error: Could not load document '-La_rwMD_ggphAW6nE9o': undefined undefined`

* `Could not find document for mapped field 'last_name' at URI atlas:json:-LaX4LMC1CfVJYp3JXM6`

You must delete this data mapper step and replace it with a new data 
mapper step in which you map the updated fields. 

While a data shape change to a mapped field always requires you to 
redo the mapping, you do not always need to delete and remove the data 
mapper step. For example, if an XML instance specifies an input data 
shape and you change the name of an element, the data mapper removes the 
mapping that was to/from the old field name. You just need to map 
to/from the field with the updated name. 

It is possible to change the data shape for a mapped field in the 
following ways:

* In an API provider integration, while editing a flow, you edit the 
OpenAPI document that defines the operation. 
+
Changing the data shape of the operation response always prevents the data mapper 
from being able to load the document. 

* In a flow, you edit the input data type and/or the output data type 
for one of these kinds of connections:

** Amazon S3
** AMQ
** AMQP
** Dropbox
** FTP/SFTP
** HTTP/HTTPS
** Kafka
** IRC
** MQTT
