Test and troubleshoot a mapping

A mapping can be tested on its own data before a port runs it. A test run only transforms the text you paste; nothing is imported into or exported from Finance and Operations. This page also lists the messages the mapper shows and what to do about them.

Test a mapping #

  1. On the Format mapping form, select Edit if the form is in view mode. INPUT DATA accepts text in edit mode only.
  2. Open the Test transformation tab.
  3. Paste data into INPUT DATA.
  4. Select Run. The result appears in OUTPUT DATA.

The run uses the current script of the mapping. Leaving the Mapping tab in edit mode saves the diagram first, so a test always runs the latest version. When the input is empty, or is not valid in the format of Incoming type, a message says so.

Test with real files, including unusual ones: empty values, missing fields, a single record, and many records.

When a port run fails #

A test run proves the mapping on the data you pasted. When the port itself fails, the transformation step appears in the execution log, and a retained snapshot shows the payload the script received and the output it produced. See Diagnosing a failing script and Snapshot viewer. Most failures come from input that is not shaped the way the sample was: compare the snapshot with the sample the trees were built from.

The time and memory a script may use are limited in Outbridge parameters. See Execution limits.

Messages while drawing #

MessageWhat to do
Invalid source / targetThe line was released where it cannot end, for example on another source field. Release it on the dot of a target field or on a block input.
This field carries a value of its own; delete it before drawing a line to itThe target field has a constant or an expression. Clear them in the field's panel, then draw the line.
Function blocks would feed each other in a circleThe line would make a chain of blocks feed itself. Connect the blocks in one direction only.
Source and target types look incompatibleA warning only. Check that the value fits the field, or convert it with a function such as to-number or to-string.
A number is expected, the value was not takenA numeric input of a block received text in its panel. Enter a number.
This diagram does not know that functionThe mapping uses a function this version does not have. Replace the block.
Use the menu of this tree to fill itThe tree is empty. Load a sample, or fill it from DMF.

Messages when filling a tree #

MessageWhat to do
The sample file is empty.Choose a file with content.
A tree can be built from a JSON or an XML sample only.Convert the sample to JSON or XML.
The data project of this port maps no fields for the entity on the headerAdd the entity to the port's data project with its field mapping, or check the Entity field on the header.
The sample declares more than one default namespace / declares the prefix … for more than one namespaceThe XML sample is unusual; the first namespace is used. Check the result with a test run.
The incoming data writes the prefix … for …, a prefix the stylesheet keeps for itselfThe sample uses a namespace prefix the script reserves for itself, for example xsl, xs, or f. Nodes written with that prefix cannot be mapped.

Messages when saving #

MessageWhat to do
… repeats and no loop runs over …, so only its first value is writtenDraw a loop over the repeating element, or pass the field through join, sum, or first.
Nothing the map reads from the incoming data repeats, so the transform writes a single recordThe sample had one record. When real files can hold more, mark the element as repeating; see Repeating elements in XML samples.
No loop was drawn, so the transform repeats over array …The mapper chose the deepest array the mapped fields sit under. Check that this is right, or let a line create the loop.
… is left out of the stylesheet: a function block on the way to it is missing inputsConnect or fill every input of the blocks in the chain.
Target node … is not part of the entity schemaThe entity has changed since the tree was filled. Fill the target tree again from DMF.
The loop over … produces …, which is not an element of the target documentThe target tree has changed. Delete the loop and draw the line again.
The stored diagram of this mapping could not be readThe stored diagram is damaged. The picture is empty; draw the mapping again and save.
The mapping document is version …, which this build does not understandThe mapping was made with a newer version of Outbridge. Open it in an environment with that version.

Common situations #

SituationSolution
The … button of the right tree cannot be selectedThe open Functions palette lies over it. Fold the palette by selecting its caption.
The label of a loop cannot be selectedA block covers it. Move the block by its handle (⠿).
A function in the palette is out of reachFold the palette groups you do not need.
Nothing on the diagram can be changedThe form is in view mode: select Edit. When the Mapping tab says that the script is maintained by hand, see Editing the script by hand.
The diagram looks wrong after an updateRefresh the browser with Ctrl+F5.
The output has one record although the file has severalThe source element was not recognized as repeating. Mark it as repeating, or check the loop.
Book a 30-min review