Data Prep mapping functions

Data Prep functions can be used to compute and calculate values based on what is entered in source fields.

Fields

A field name can be any legal identifier - an unlimited-length sequence of Unicode letters and digits, beginning with a letter, the dollar sign ($), or the underscore character (_). Variable names are also case sensitive.

If a field name does not follow this convention, the field name must be wrapped with ${}. So, for example, if the field name is “First Name” or “First.Name”, then the name must be wrapped like ${First Name} or ${First\.Name} respectively.

TIP
When interacting with hierarchies, if a child attribute has a period (.), you must use a backslash (\) to escape special characters. For more information, read the guide on escaping special characters.

If a field name is any of the following reserved keywords, it must be wrapped with ${}{}:

new, mod, or, break, var, lt, for, false, while, eq, gt, div, not, null, continue, else, and, ne, true, le, if, ge, return, _errors, do, function, empty, size

Additionally, reserved keywords also include any of the mapper functions listed on this page.

Data within sub-fields can be accessed by using the dot notation. For example, if there was a name object, to access the firstName field, use name.firstName.

List of functions

The following tables list all supported mapping functions, including sample expressions and their resulting outputs.

String functions string

NOTE
Please scroll left/right to view the full contents of the table.
Function
Description
Parameters
Syntax
Expression
Sample output
concat
Concatenates the given strings.
  • STRING: The strings that will be concatenated.
concat(STRING_1, STRING_2)
concat("Hi, ", “there”, “!”)
"Hi, there!"
explode
Splits the string based on a regex and returns an array of parts. Can optionally include regex to split the string. By default, the splitting resolves to “,”. The following delimiters need to be escaped with \: +, ?, ^, |, ., [, (, {, ), *, $, \ If you include multiple characters as the delimiter, the delimiter will be treated as a multi-character delimiter.
  • STRING: Required The string that needs to be split.
  • REGEX: Optional The regular expression that can be used to split the string.
explode(STRING, REGEX)
explode(“Hi, there!”, " ")
["Hi,", "there"]
instr
Returns the location/index of a substring.
  • INPUT: Required The string that is being searched.
  • SUBSTRING: Required The substring that is being searched for within the string.
  • START_POSITION: Optional The location of where to start looking in the string.
  • OCCURRENCE: Optional The nth occurrence to look for from the start position. By default, it is 1.
instr(INPUT, SUBSTRING, START_POSITION, OCCURRENCE)
instr(“adobe.com”, “com”)
6
replacestr
Replaces the search string if present in original string.
  • INPUT: Required The input string.
  • TO_FIND: Required The string to look up within the input.
  • TO_REPLACE: Required The string that will replace the value within “TO_FIND”.
replacestr(INPUT, TO_FIND, TO_REPLACE)
replacestr(“This is a string re test”, “re”, “replace”)
“This is a string replace test”
substr
Returns a substring of a given length.
  • INPUT: Required The input string.
  • START_INDEX: Required The index of the input string where the substring starts.
  • LENGTH: Required The length of the substring.
substr(INPUT, START_INDEX, LENGTH)
substr(“This is a substring test”, 7, 8)
" a subst"
lower /
lcase
Converts a string to lowercase.
  • INPUT: Required The string that will be converted to lowercase.
lower(INPUT)
lower(“HeLLo”)
lcase(“HeLLo”)
“hello”
upper /
ucase
Converts a string to uppercase.
  • INPUT: Required The string that will be converted to uppercase.
upper(INPUT)
upper(“HeLLo”)
ucase(“HeLLo”)
“HELLO”
split
Splits an input string on a separator. The following separator needs to be escaped with \: \. If you include multiple delimiters, the string will split on any of the delimiters present in the string. Note: This function only returns non-null indexes from the string, regardless of the presence of the separator. If all indexes, including nulls, are required in the resulting array, use the “explode” function instead.
  • INPUT: Required The input string that is going to be split.
  • SEPARATOR: Required The string that is used to split the input.
split(INPUT, SEPARATOR)
split(“Hello world”, " ")
["Hello", "world"]
join
Joins a list of objects using the separator.
  • SEPARATOR: Required The string that will be used to join the objects.
  • OBJECTS: Required An array of strings that will be joined.
join(SEPARATOR, [OBJECTS])
join(" ", to_array(true, "Hello", "world"))
“Hello world”
lpad
Pads the left side of a string with the other given string.
  • INPUT: Required The string that is going to be padded out. This string can be null.
  • COUNT: Required The size of the string to be padded out.
  • PADDING: Required The string to pad the input with. If null or empty, it will be treated as a single space.
lpad(INPUT, COUNT, PADDING)
lpad(“bat”, 8, “yz”)
“yzyzybat”
rpad
Pads the right side of a string with the other given string.
  • INPUT: Required The string that is going to be padded out. This string can be null.
  • COUNT: Required The size of the string to be padded out.
  • PADDING: Required The string to pad the input with. If null or empty, it will be treated as a single space.
rpad(INPUT, COUNT, PADDING)
rpad(“bat”, 8, “yz”)
“batyzyzy”
left
Gets the first “n” characters of the given string.
  • STRING: Required The string you are getting the first “n” characters for.
  • COUNT: RequiredThe “n” characters you want to get from the string.
left(STRING, COUNT)
left(“abcde”, 2)
“ab”
right
Gets the last “n” characters of the given string.
  • STRING: Required The string you are getting the last “n” characters for.
  • COUNT: RequiredThe “n” characters you want to get from the string.
right(STRING, COUNT)
right(“abcde”, 2)
“de”
ltrim
Removes the whitespace from the beginning of the string.
  • STRING: Required The string you want to remove the whitespace from.
ltrim(STRING)
ltrim(" hello")
“hello”
rtrim
Removes the whitespace from the end of the string.
  • STRING: Required The string you want to remove the whitespace from.
rtrim(STRING)
rtrim("hello ")
“hello”
trim
Removes the whitespace from the beginning and the end of the string.
  • STRING: Required The string you want to remove the whitespace from.
trim(STRING)
trim(" hello ")
“hello”
equals
Compares two strings to confirm if they are equal. This function is case sensitive.
  • STRING1: Required The first string you want to compare.
  • STRING2: Required The second string you want to compare.
STRING1.​equals(​STRING2)
“string1”.​equals​(“STRING1”)
false
equalsIgnoreCase
Compares two strings to confirm if they are equal. This function is not case sensitive.
  • STRING1: Required The first string you want to compare.
  • STRING2: Required The second string you want to compare.
STRING1.​equalsIgnoreCase​(STRING2)
“string1”.​equalsIgnoreCase​("STRING1)
true

Regular expression functions

Function
Description
Parameters
Syntax
Expression
Sample output
extract_regex
Extracts groups from the input string, based on a regular expression.
  • STRING: Required The string that you are extracting the groups from.
  • REGEX: Required The regular expression that you want the group to match.
extract_regex(STRING, REGEX)
extract_regex​("E259,E259B_009,1_1"​, “([,]+),[,]*,([^,]+)”)
[“E259,E259B_009,1_1”, “E259”, “1_1”]
matches_regex
Checks to see if the string matches against the inputted regular expression.
  • STRING: Required The string that you are checking matches the regular expression.
  • REGEX: Required The regular expression that you are comparing against.
matches_regex(STRING, REGEX)
matches_regex(“E259,E259B_009,1_1”, “([,]+),[,]*,([^,]+)”)
true

Hashing functions hashing

NOTE
Please scroll left/right to view the full contents of the table.
Function
Description
Parameters
Syntax
Expression
Sample output
sha1
Takes an input and produces a hash value using Secure Hash Algorithm 1 (SHA-1).
  • INPUT: Required The plain text to be hashed.
  • CHARSET: Optional The name of the character set. Possible values include UTF-8, UTF-16, ISO-8859-1, and US-ASCII.
sha1(INPUT, CHARSET)
sha1(“my text”, “UTF-8”)
c3599c11e47719df18a24​48690840c5dfcce3c80
sha256
Takes an input and produces a hash value using Secure Hash Algorithm 256 (SHA-256).
  • INPUT: Required The plain text to be hashed.
  • CHARSET: Optional The name of the character set. Possible values include UTF-8, UTF-16, ISO-8859-1, and US-ASCII.
sha256(INPUT, CHARSET)
sha256(“my text”, “UTF-8”)
7330d2b39ca35eaf4cb95fc846c21​ee6a39af698154a83a586ee270a0d372104
sha512
Takes an input and produces a hash value using Secure Hash Algorithm 512 (SHA-512).
  • INPUT: Required The plain text to be hashed.
  • CHARSET: Optional The name of the character set. Possible values include UTF-8, UTF-16, ISO-8859-1, and US-ASCII.
sha512(INPUT, CHARSET)
sha512(“my text”, “UTF-8”)
a3d7e45a0d9be5fd4e4b9a3b8c9c2163c21ef​708bf11b4232bb21d2a8704ada2cdcd7b367dd0788a89​a5c908cfe377aceb1072a7b386b7d4fd2ff68a8fd24d16
md5
Takes an input and produces a hash value using MD5.
  • INPUT: Required The plain text to be hashed.
  • CHARSET: Optional The name of the character set. Possible values include UTF-8, UTF-16, ISO-8859-1, and US-ASCII.
md5(INPUT, CHARSET)
md5(“my text”, “UTF-8”)
d3b96ce8c9fb4​e9bd0198d03ba6852c7
crc32
Takes an input uses a cyclic redundancy check (CRC) algorithm to produce a 32-bit cyclic code.
  • INPUT: Required The plain text to be hashed.
  • CHARSET: Optional The name of the character set. Possible values include UTF-8, UTF-16, ISO-8859-1, and US-ASCII.
crc32(INPUT, CHARSET)
crc32(“my text”, “UTF-8”)
8df92e80

URL functions url

NOTE
Please scroll left/right to view the full contents of the table.
Function
Description
Parameters
Syntax
Expression
Sample output
get_url_protocol
Returns the protocol from the given URL. If the input is invalid, it returns null.
  • URL: Required The URL from which the protocol needs to be extracted.
get_url_protocol​(URL)
get_url_protocol(“https://platform​.adobe.com/home”)
https
get_url_host
Returns the host of the given URL. If the input is invalid, it returns null.
  • URL: Required The URL from which the host needs to be extracted.
get_url_host​(URL)
get_url_host​(“https://platform​.adobe.com/home”)
platform.adobe.com
get_url_port
Returns the port of the given URL. If the input is invalid, it returns null.
  • URL: Required The URL from which the port needs to be extracted.
get_url_port(URL)
get_url_port​(“sftp://example.com//home/​joe/employee.csv”)
22
get_url_path
Returns the path of the given URL. By default, the full path is returned.
  • URL: Required The URL from which the path needs to be extracted.
  • FULL_PATH: Optional A boolean value that determines if the full path is returned. If set to false, only the end of the path is returned.
get_url_path​(URL, FULL_PATH)
get_url_path​(“sftp://example.com//​home/joe/employee.csv”)
“//home/joe/​employee.csv”
get_url_query_str
Returns the query string of a given URL as a map of query string name and query string value.
  • URL: Required The URL that you are trying to get the query string from.
  • ANCHOR: Required Determines what will be done with the anchor in the query string. Can be one of three values: “retain”, “remove”, or “append”.

    If the value is “retain”, the anchor will be attached to the returned value.
    If the value is “remove”, the anchor will be removed from the returned value.
    If the value is “append”, the anchor will be returned as a separate value.
get_url_query_str​(URL, ANCHOR)
get_url_query_str​(“foo://example.com:8042​/over/there?name=​ferret#nose”, “retain”)
get_url_query_str​(“foo://example.com:8042​/over/there?name=​ferret#nose”, “remove”)
get_url_query_str​(“foo://example.com​:8042/over/there​?name=ferret#nose”, “append”)
{"name": "ferret#nose"}
{"name": "ferret"}
{"name": "ferret", "_anchor_": "nose"}
get_url_encoded
This function takes a URL as input and replaces or encodes the special characters with ASCII characters. For more information on special characters, please read the list of special characters in the appendix of this document.
  • URL: Required The input URL with special characters that you want to replace or encode with ASCII characters.
get_url_encoded(URL)
get_url_encoded(“https://example.com/partneralliance_asia-pacific_2022”)
https%3A%2F%2Fexample.com%2Fpartneralliance_asia-pacific_2022
get_url_decoded
This function takes a URL as input and decodes the ASCII characters into special characters. For more information on special characters, please read the list of special characters in the appendix of this document.
  • URL: Required The input URL with ASCII characters that you want to decode into special characters.
get_url_decoded(URL)
get_url_decoded(“https%3A%2F%2Fexample.com%2Fpartneralliance_asia-pacific_2022”)
https://example.com/partneralliance_asia-pacific_2022

Date and time functions date-and-time

NOTE
Please scroll left/right to view the full contents of the table. More information about the date function can be found in the dates section of the data format handling guide.
Function
Description
Parameters
Syntax
Expression
Sample output
now
Retrieves the current time.
now()
now()
2021-10-26T10:10:24Z
timestamp
Retrieves the current Unix time.
timestamp()
timestamp()
1571850624571
format
Formats the input date according to a specified format.
  • DATE: Required The input date, as a ZonedDateTime object, that you want to format.
  • FORMAT: Required The format that you want the date to be changed to.
format(DATE, FORMAT)
format(2019-10-23T11:24:00+00:00, “yyyy-MM-dd HH:mm:ss”)
2019-10-23 11:24:35
dformat
Converts a timestamp to a date string according to a specified format.
  • TIMESTAMP: Required The timestamp you want to format. This is written in milliseconds.
  • FORMAT: Required The format that you want the timestamp to become.
dformat(TIMESTAMP, FORMAT)
dformat(1571829875000, “yyyy-MM-dd'T'HH:mm:ss.SSSX”)
2019-10-23T11:24:35.000Z
date
Converts a date string into a ZonedDateTime object (ISO 8601 format).
  • DATE: Required The string that represents the date.
  • FORMAT: Required The string representing the format of the source date.Note: This does not represent the format you want to convert the date string into.
  • DEFAULT_DATE: Required The default date returned, if the date provided is null.
date(DATE, FORMAT, DEFAULT_DATE)
date(“2019-10-23 11:24”, “yyyy-MM-dd HH:mm”, now())
2019-10-23T11:24:00Z
date
Converts a date string into a ZonedDateTime object (ISO 8601 format).
  • DATE: Required The string that represents the date.
  • FORMAT: Required The string representing the format of the source date.Note: This does not represent the format you want to convert the date string into.
date(DATE, FORMAT)
date(“2019-10-23 11:24”, “yyyy-MM-dd HH:mm”)
2019-10-23T11:24:00Z
date
Converts a date string into a ZonedDateTime object (ISO 8601 format).
  • DATE: Required The string that represents the date.
date(DATE)
date(“2019-10-23 11:24”)
“2019-10-23T11:24:00Z”
date_part
Retrieves the parts of the date. The following component values are supported:

“year”
“yyyy”
“yy”

“quarter”
“qq”
“q”

“month”
“mm”
“m”

“dayofyear”
“dy”
“y”

“day”
“dd”
“d”

“week”
“ww”
“w”

“weekday”
“dw”
“w”

“hour”
“hh”
“hh24”
“hh12”

“minute”
“mi”
“n”

“second”
“ss”
“s”

“millisecond”
“SSS”
  • COMPONENT: Required A string representing the part of the date.
  • DATE: Required The date, in a standard format.
date_part​(COMPONENT, DATE)
date_part(“MM”, date(“2019-10-17 11:55:12”))
10
set_date_part
Replaces a component in a given date. The following components are accepted:

“year”
“yyyy”
“yy”

“month”
“mm”
“m”

“day”
“dd”
“d”

“hour”
“hh”

“minute”
“mi”
“n”

“second”
“ss”
“s”
  • COMPONENT: Required A string representing the part of the date.
  • VALUE: Required The value to set for the component for a given date.
  • DATE: Required The date, in a standard format.
set_date_part​(COMPONENT, VALUE, DATE)
set_date_part(“m”, 4, date(“2016-11-09T11:44:44.797”)
“2016-04-09T11:44:44Z”
make_date_time
Creates a date from parts. This function can also be induced using make_timestamp.
  • YEAR: Required The year, written in four digits.
  • MONTH: Required The month. The allowed values are 1 to 12.
  • DAY: Required The day. The allowed values are 1 to 31.
  • HOUR: Required The hour. The allowed values are 0 to 23.
  • MINUTE: Required The minute. The allowed values are 0 to 59.
  • NANOSECOND: Required The nanosecond values. The allowed values are 0 to 999999999.
  • TIMEZONE: Required The timezone for the date time.
make_date_time​(YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, NANOSECOND, TIMEZONE)
make_date_time​(2019, 10, 17, 11, 55, 12, 999, “America/Los_Angeles”)
2019-10-17T11:55:12Z
zone_date_to_utc
Converts a date in any timezone to a date in UTC.
  • DATE: Required The date that you are trying to convert.
zone_date_to_utc​(DATE)
zone_date_to_utc​(2019-10-17T11:55:​12 PST
2019-10-17T19:55:12Z
zone_date_to_zone
Converts a date from one timezone to another timezone.
  • DATE: Required The date that you are trying to convert.
  • ZONE: Required The timezone that you are trying to convert the date to.
zone_date_to_zone​(DATE, ZONE)
zone_date_to_zone(now(), "Europe/Paris")
2021-10-26T15:43:59Z

Hierarchies - Objects objects

NOTE
Please scroll left/right to view the full contents of the table.
Function
Description
Parameters
Syntax
Expression
Sample output
is_empty
Checks whether or not an object is empty.
  • INPUT: Required The object that you’re trying to check is empty.
is_empty(INPUT)
is_empty([1, null, 2, 3])
false
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
code language-[
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
For information on the object copy feature, see the section below.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### Hierarchies - Arrays
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>Please scroll left/right to view the full contents of the table.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### Hierarchies - Map
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>Please scroll left/right to view the full contents of the table.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### Logical operators
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>Please scroll left/right to view the full contents of the table.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### Aggregation
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>Please scroll left/right to view the full contents of the table.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### Type conversions
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>Please scroll left/right to view the full contents of the table.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### JSON functions
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>Please scroll left/right to view the full contents of the table.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### Special operations
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>Please scroll left/right to view the full contents of the table.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### User agent functions
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
Any of the user agent functions contained in the table below can return either of the following values:
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
* Phone - A mobile device with a small screen (commonly < 7")
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
* Mobile - A mobile device that is yet to be identified. This mobile device can be an eReader, a tablet, a phone, a watch, etc.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
For more information on device field values, please read the list of device field values in the appendix of this document.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>Please scroll left/right to view the full contents of the table.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### Analytics functions
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!NOTE]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>You may only use the following analytics functions for WebSDK and Adobe Analytics flows.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
<!–
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
–>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
### Object copy
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>[!TIP]
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
>The object copy feature is automatically applied when an object in the source is mapped to an object in the XDM. No additional action needed from users.
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
You can use the object copy feature to automatically copy attributes of an object without making changes to the mapping. For example, if your source data has a structure of:
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
arrays_to_object
Creates a list of objects.
  • INPUT: Required A grouping of key and array pairs.
arrays_to_object(INPUT)
arrays_to_objects('sku', explode("id1|id2", '\\|'), 'price', [22.5,14.35])
address{
line1: 4191 Ridgebrook Way,
city: San Jose,
state: California
}

and an XDM structure of:

```json
addr{
    addrLine1: 4191 Ridgebrook Way,
    city: San Jose,
    state: California
    }

Then the mapping becomes:

address -> addr
address.line1 -> addr.addrLine1

In the example above, the city and state attributes are also ingested automatically at runtime because the address object is mapped to addr. If you were to create a line2 attribute in the XDM structure and your input data also contains a line2 in the address object, then it will also be automatically ingested without any need to manually alter the mapping.

To ensure that the automatic mapping works, the following prerequisites must be met:

  • Parent-level objects should be mapped;
  • New attributes must have been created in the XDM schema;
  • New attributes should have matching names in the source schema and the XDM schema.

If any of the prerequisites are not met, then you must manually map the source schema to the XDM schema using data prep.

Appendix

The following provides additional information on using Data Prep mapping functions

Special characters special-characters

The table below outlines a list of reserved characters and their corresponding encoded characters.

Reserved character
Encoded character
space
%20
!
%21
"
%22
#
%23
$
%24
%
%25
&
%26
%27
(
%28
)
%29
*
%2A
+
%2B
,
%2C
/
%2F
:
%3A
;
%3B
<
%3C
=
%3D
>
%3E
?
%3F
@
%40
[
%5B
]
%5D
^
%5E
`
%60
~
%7E

Device field values device-field-values

The table below outlines a list of device field values and their corresponding descriptions.

Device
Description
Desktop
A Desktop or a Laptop type of device.
Anonymized
An anonymous device. In some cases, these are useragents that have been altered by an anonymization software.
Unknown
An unknown device. These are usually useragents that contain no information about the device.
Mobile
A mobile device that is yet to be identified. This mobile device can be an eReader, a tablet, a phone, a watch, etc.
Tablet
A mobile device with a large screen (commonly > 7").
Phone
A mobile device with a small screen (commonly < 7").
Watch
A mobile device with a tiny screen (commonly < 2"). These devices normally operate as an additional screen for a phone/tablet type of device.
Augmented Reality
A mobile device with AR capabilities.
Virtual Reality
A mobile device with VR capabilities.
eReader
A device similar to a tablet, but usually with an eInk screen.
Set-top box
A connected device that allows interaction through a TV-sized screen.
TV
A device similar to the Set-top box, but is built into the TV.
Home Appliance
A (usually large) home appliance, like a refrigerator.
Game Console
A fixed gaming system like a Playstation or an XBox.
Handheld Game Console
A mobile gaming system like a Nintendo Switch.
Voice
A voice-driven device like an Amazon Alexa or a Google Home.
Car
A vehicle-based browser.
Robot
Robots that visit a website.
Robot Mobile
Robots that visit a website but indicates that they want to be seen as a Mobile visitor.
Robot Imitator
Robots that visit a website, pretending that are robots like Google, but they are not. Note: In most cases, Robot Imitators are indeed robots.
Cloud
A cloud-based application. These are neither robots nor hackers, but are applications that need to connect. This includes Mastodon servers.
Hacker
This device value is used in case scripting is detected in the useragent string.

Code samples code-samples

map_get_values map-get-values

Select to view example
code language-json
 example = "map_get_values(book_details,\"author\") where input is : {\n" +
        "    \"book_details\":\n" +
        "    {\n" +
        "        \"author\": \"George R. R. Martin\",\n" +
        "        \"price\": 17.99,\n" +
        "        \"ISBN\": \"ISBN-978-0553801477\"\n" +
        "    }\n" +
        "}",
      result = "{\"author\": \"George R. R. Martin\"}"

map_has_keys map_has_keys

Select to view example
code language-json
 example = "map_has_keys(book_details,\"author\")where input is : {\n" +
        "    \"book_details\":\n" +
        "    {\n" +
        "        \"author\": \"George R. R. Martin\",\n" +
        "        \"price\": 17.99,\n" +
        "        \"ISBN\": \"ISBN-978-0553801477\"\n" +
        "    }\n" +
        "}",
      result = "true"

add_to_map add_to_map

Select to view example
code language-json
example = "add_to_map(book_details, book_details2) where input is {\n" +
        "    \"book_details\":\n" +
        "    {\n" +
        "        \"author\": \"George R. R. Martin\",\n" +
        "        \"price\": 17.99,\n" +
        "        \"ISBN\": \"ISBN-978-0553801477\"\n" +
        "    }\n" +
        "}" +
        "{\n" +
        "    \"book_details2\":\n" +
        "    {\n" +
        "        \"author\": \"Neil Gaiman\",\n" +
        "        \"price\": 17.99,\n" +
        "        \"ISBN\": \"ISBN-0-380-97365-0\"\n" +
        "        \"publisher\": \"William Morrow\"\n" +
        "    }\n" +
        "}",
      result = "{\n" +
        "    \"book_details\":\n" +
        "    {\n" +
        "        \"author\": \"George R. R. Martin\",\n" +
        "        \"price\": 17.99,\n" +
        "        \"ISBN\": \"ISBN-978-0553801477\"\n" +
        "        \"publisher\": \"William Morrow\"\n" +
        "    }\n" +
        "}",
      returns = "A new map with all elements from map and addends"

object_to_map object_to_map

Syntax 1

Select to view example
code language-json
example = "object_to_map(\"firstName\", \"John\", \"lastName\", \"Doe\")",
result = "{\"firstName\" : \"John\", \"lastName\": \"Doe\"}"

Syntax 2

Select to view example
code language-json
example = "object_to_map(address) where input is " +
  "address: {line1 : \"345 park ave\",line2: \"bldg 2\",City : \"san jose\",State : \"CA\",type: \"office\"}",
result = "{line1 : \"345 park ave\",line2: \"bldg 2\",City : \"san jose\",State : \"CA\",type: \"office\"}"

Syntax 3

Select to view example
code language-json
example = "object_to_map(addresses,type)" +
        "\n" +
        "[\n" +
        "    {\n" +
        "        \"line1\": \"345 park ave\",\n" +
        "        \"line2\": \"bldg 2\",\n" +
        "        \"City\": \"san jose\",\n" +
        "        \"State\": \"CA\",\n" +
        "        \"type\": \"home\"\n" +
        "    },\n" +
        "    {\n" +
        "        \"line1\": \"345 park ave\",\n" +
        "        \"line2\": \"bldg 2\",\n" +
        "        \"City \": \"san jose\",\n" +
        "        \"State\": \"CA\",\n" +
        "        \"type\": \"work\"\n" +
        "    },\n" +
        "    {\n" +
        "        \"line1\": \"345 park ave\",\n" +
        "        \"line2\": \"bldg 2\",\n" +
        "        \"City \": \"san jose\",\n" +
        "        \"State\": \"CA\",\n" +
        "        \"type\": \"office\"\n" +
        "    }\n" +
        "]" ,
result = "{\n" +
        "    \"home\":\n" +
        "    {\n" +
        "        \"line1\": \"345 park ave\",\n" +
        "        \"line2\": \"bldg 2\",\n" +
        "        \"City\": \"san jose\",\n" +
        "        \"State\": \"CA\",\n" +
        "        \"type\": \"home\"\n" +
        "    },\n" +
        "    \"work\":\n" +
        "    {\n" +
        "        \"line1\": \"345 park ave\",\n" +
        "        \"line2\": \"bldg 2\",\n" +
        "        \"City \": \"san jose\",\n" +
        "        \"State\": \"CA\",\n" +
        "        \"type\": \"work\"\n" +
        "    },\n" +
        "    \"office\":\n" +
        "    {\n" +
        "        \"line1\": \"345 park ave\",\n" +
        "        \"line2\": \"bldg 2\",\n" +
        "        \"City \": \"san jose\",\n" +
        "        \"State\": \"CA\",\n" +
        "        \"type\": \"office\"\n" +
        "    }\n" +
        "}"

array_to_map array_to_map

Select to view example
code language-json
example = "array_to_map(addresses, \"type\") where addresses is\n" +
  "\n" +
  "[\n" +
  "    {\n" +
  "        \"line1\": \"345 park ave\",\n" +
  "        \"line2\": \"bldg 2\",\n" +
  "        \"City\": \"san jose\",\n" +
  "        \"State\": \"CA\",\n" +
  "        \"type\": \"home\"\n" +
  "    },\n" +
  "    {\n" +
  "        \"line1\": \"345 park ave\",\n" +
  "        \"line2\": \"bldg 2\",\n" +
  "        \"City \": \"san jose\",\n" +
  "        \"State\": \"CA\",\n" +
  "        \"type\": \"work\"\n" +
  "    },\n" +
  "    {\n" +
  "        \"line1\": \"345 park ave\",\n" +
  "        \"line2\": \"bldg 2\",\n" +
  "        \"City \": \"san jose\",\n" +
  "        \"State\": \"CA\",\n" +
  "        \"type\": \"office\"\n" +
  "    }\n" +
  "]" ,
result = "{\n" +
  "    \"home\":\n" +
  "    {\n" +
  "        \"line1\": \"345 park ave\",\n" +
  "        \"line2\": \"bldg 2\",\n" +
  "        \"City\": \"san jose\",\n" +
  "        \"State\": \"CA\",\n" +
  "        \"type\": \"home\"\n" +
  "    },\n" +
  "    \"work\":\n" +
  "    {\n" +
  "        \"line1\": \"345 park ave\",\n" +
  "        \"line2\": \"bldg 2\",\n" +
  "        \"City \": \"san jose\",\n" +
  "        \"State\": \"CA\",\n" +
  "        \"type\": \"work\"\n" +
  "    },\n" +
  "    \"office\":\n" +
  "    {\n" +
  "        \"line1\": \"345 park ave\",\n" +
  "        \"line2\": \"bldg 2\",\n" +
  "        \"City \": \"san jose\",\n" +
  "        \"State\": \"CA\",\n" +
  "        \"type\": \"office\"\n" +
  "    }\n" +
  "}",
returns = "Returns a map with given field name and value pairs or null if input is null"
recommendation-more-help
experience-platform-help-data-prep