Transform Data Using Functions in Publication Maps
You can use transformation functions in publication maps to transform the data before publishing it to a target spoke system.
You can apply the transformation functions for TEXT output file types.
To transform data using functions in publication maps:
- On the Publication Map page, select a mapping and click
Transform.
The Transform master attributes drawer is displayed, where you can add and validate transformation expressions using functions and attributes.
- On the Functions and Attributes tabs,
drag and drop the required functions and attributes into the Add
expression field.
You can click each function and view the syntax and the description in the Function Description section. For details, see Functions for Transform Expressions.
You can search for attributes on the Attributes tab.
- After adding the expression, click Validate to validate the expression. When the expression is successfully validated, the Expression validated message appears with the green tick mark beneath the Add expression field.
- Click Transform. The validated expression is displayed in the
Expression column for the corresponding mapping on the
Publication Maps page.Note: You can only transform one spoke to master attribute mapping at a time.
Functions for Transform Expressions
The functions used to create transform expressions can be of type Generic, Math, or String.
Generic Functions
The generic functions available for creating expressions are listed in the following table.
Name |
Description |
Expression |
Example |
---|---|---|---|
|
Returns the value of expression2 if the value of expression1 is blank, otherwise returns the value of expression1. |
|
|
|
Returns the value of custom object attribute corresponding to the specified custom object attribute and expression. |
|
getCustomObjectValue("CustomObject","CustomObjectAttribute1","CustomObjectAttribute2",[CSV
Column1]) = Media Inc. where:
|
|
Returns the value of expression3 if the value of expression1 equals value of expression2, otherwise returns the value of expression4. |
|
decode([Attribute1],[Attribute2],[Attribute3],[Attribute4])
results in Match where:
|
|
Converts an object to its string representation. |
|
If Attribute1 = 4 , then
toString([Attribute1]) = 4
|
String Functions
The string functions available for creating expressions are listed in the following table.
Name |
Description |
Expression |
Example |
---|---|---|---|
|
Concatenates the specified character strings. |
|
If Attribute1 = Item and
Attribute2 = Description , then
concat([Attribute1],[Attribute2]) =
ItemDescription |
|
Returns the length, in number of characters, of a specified string. The length excludes blank characters. |
|
If |
|
Splits character string at the specified delimiter and returns the specified part of the string. Delimiter can be any regular expression or special character. |
|
If |
|
Creates a new string of specified length, starting from the specified character number in the original string. |
|
If |
|
Inserts a specified character string into the specified location in another character string. |
|
|
|
Converts a character string to uppercase. |
|
If |
|
Converts a character string to lowercase. |
|
If Attribute1 = ITEM , then
lowercase([Attribute1]) = item
|
Math Functions
The math functions available for creating expressions are listed in the following table.
Name |
Description |
Expression |
Example |
---|---|---|---|
|
Rounds a numeric expression to n digits of precision. |
|
If Attribute1 = 10.45
|