How to work with calculated fields
array_to_string
function to concatenate fields into a string.In the mapping step of the activation workflow for cloud storage destinations, select Add calculated field.
This opens a modal window where you can select functions and fields to export attributes out of Experience Platform.
For example, use the array_to_string
function on the organizations
field as shown below to export the organizations array as a string in a CSV file. View more information about this and other examples further below.
Select Save to keep the calculated field and return to the mapping step.
Back in the mapping step of the workflow, fill in the Target field with a value of the column header you want for this field in the exported files.
When ready, select Next to proceed to the next step of the activation workflow.
Sample supported functions to perform data transformations
All the documented Data Prep functions are supported when activating data to file-based destinations.
The functions below, specific to handling exports of arrays, or applying hashing to fields, are documented along with examples.
array_to_string
flattenArray
filterArray
transformArray
coalesce
size_of
iif
index-based array access
add_to_array
to_array
first
last