Advanced Field Editor

Advanced Field Editor is available in the Data Mapping step in a Data Upload or How to Deploy Accelerator Package. To open this dialog, click the Edit  icon. 

Depending on the output type of the data, there are the following sections available: 

You can also watch a video tutorial How to Work with Advanced Field Editor (Video). 

  • If you make your edits in multiple tabs (e.g. Groovy and Expert Options) and click Save, only the setting on the current tab is saved and used; the rest is ignored.

  • Converters are shown and applied on each tab.

Converters

Converter Expression allows you to change the data types, e.g. from String to Date. Once you set this field up, it is always applied to the result of the setup above (from Multiple field or Groovy).

To add a new converter, click the + icon and select from a drop-down menu which shows the converters defined in IntegrationManager. For more details on converters, see the IntegrationManager documentation.

This option is available for:

  • All input types

  • All output types

Multiple Field

Here you can select multiple fields from your input CSV file to construct a unique ID (by concatenation using underscore “_“ as a delimiter) for a given field.

This option is available for:

  • String input types

  • String output type

Groovy

Here you can enter you own Groovy code to make more complex transformations when mapping data from the CSV to the destination table. The code is executed for each row. You can access data in the row using a binding variable body, which is an injected map string to string where a key is a field name and a value is a field value. The script returns a value which is mapped to the destination table column. The script is restricted by Sandbox (no imports, only whitelisted classes allowed).

Examples of use:

body["Product Group"] + " " + body["Label"]

Joins two fields.

body.key3.substring(0,body.key3.indexOf('_')

Obtains a substring from the first character up to the underscore character.

body.price1.trim()

Trims the white spaces.

header.CamelFileName

Obtains the source file name.

new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date())

Enters a date of creation.

 

This option is available for:

  • All input types

  • All output types

Formula

Here you can enter a formula to be used for the number fields found in the CSV file. In the table you can see what number fields were found (together with a value found in the first row). To construct the formula, use the keys assigned to the individual fields (A, B,...). Supported operators are: +, -, /, *. 

Example
A * B

In the Result field, you can immediately check the results (based on the value found in the first row in your CSV). 

  After you save your formula, it is preserved in the Data Mapping step and if you upload a new data file, this formula is applied again. The pattern here is that if your number columns A and B were on e.g. 7th and 8th position in the file, the next time you upload a new file, the formula is applied on the 7th and 8th columns (and if they are not numbers, you get an error).

This option is available for:

  • Number output type and if your CSV data contain number fields.

  • Once set up, the input type sets automatically to Formula afterwards.

Expert Options

In this section you can perform advanced operations of the following types:

  • header – Allows to enter a header definition as in mappers.

  • property – Allows to enter a property definition as in mappers.

  • simple – Allows you to define the fields using the Simple expression language. 

  • constant – Allows to enter a constant value which is transferred to the data.

 

Once you set up an operation for you data on one of these tabs and go back to the mapping step, the field is marked appropriately, e.g.:

PlatformManager version 1.75.0