JSON Property Fields

Overview

In the Semarchy xDI JSON Metadata, Property Fields are used to retrieve additional technical data about the JSON file during the data flow.

When reading or writing the JSON file, technical information such as file name, path, or size can be dynamically processed.

Configure Property Fields

To configure Property Fields:

  1. Create or Edit a JSON metadata. See Metadata and Reverse Engineering.

  2. In the metadata editor, right-click a JSON node, then choose New > Property Field.

  3. Give a Name to the property field and select the type of property in the Property attribute.

The types of properties available depend on the type of the JSON node selected. Refer to the table below for the full list of properties.
Property Usable at Read Usable at Write Description

fileAbsolutePath

X

Absolute path of the file.

fileCanonicalPath

X

Canonical path of the file.

fileName

X

Name of the file.

fileParentName

X

Name of the folder containing the file.

fileParentPath

X

Path of the folder containing the file.

filePath

X

Path of the file.

fileSequenceNumber

X

Place of the file in the queue of found files. Useful in case of using file masks.

fileTotalSpace

X

Total disk space.

nodeAbsolutePosition

X

Position of the current node which is incremented on each node.

nodeLocalName

X

Name of the node.

nodeLocalPosition

X

Position of the current node in its parent

nodeName

X

Name of the JSON node when writing a JSON File. This can be used to define dynamically the node name at execution.

nodePath

X

Path of the current node.

For example:

/root[1]/customers[1]/e[1]/phones[1]/e[1]

With [1] being the nodeLocalPosition.

nodeUUID

X

Generated identifier for each node when reading JSON data.

binary_content

X

The full content of the file is retrieved directly as binary data in this field.

string_content

X

The full content of the file retrieved as string data in this field.

Use Property Fields in a Mapping

To use JSON Properties Fields in a mapping:

  1. Drag and drop the JSON structure into the mapping.

  2. Map the Property Fields as the source or the target, depending on the type of property.