Introduction to Data Workflow Array Operators

Estimated Reading Time:  2 minutes

Overview

The Array operators let you retrieve data from a data set, add values to a data structure, and join an array of values.

What You'll Learn

In this article, you'll get an overview of the various Data Workflow Array operators.

Array Operators

Below is a list of the Data Workflow Array operators with descriptions of how to use them.

Operator

Description

Array2Col

Converts an array of values to an array of key/value pair objects (a column in a table). Each value in the source array becomes one key/value pair object. In the Key Name field, enter a key to use in the key/value pairs. The value comes from the source array of values.

Get

Retrieves data from your data set based on the value entered in the Path field. You can use the operator to retrieve individual values or entire rows of an array. For example, a Path of [0] retrieves the first row of your data set. A Path of [0].keyName retrieves the specified key/value pair from the first row of your data set. It's also useful for referencing Global Variables.

TIP  You can use _arg in the Path field to reference the input coming into the top argument port.

Includes

Determines if a specified value exists in the input. Then, it outputs a Boolean value. The input should be a value or an array of values. In the Value field, enter a value to determine if it is included in your data set. If your data includes that value, the output is True. If not, the output is False.

Join

Joins an array of values and outputs a string of those values. In the Separator field, enter a character that separates the values in the final string. When joining string values, the final string does not include quotation marks around each value.

TIP  You can use the Col2Array operator to quickly create an array of values from a single column in a table.

Set

Lets you add values to a data structure. Connect the data structure where you want to add values to the operator's upper input port. In the Path field, enter the key of the key/value pair you want to create. You can use dot notation to specify index positions in an array. For example, [0].key. In the Value field, enter the value for the key/value pair you want to create. Or, leave the Value field blank and connect the value or structure you want to add to the lower input port.

TIP  You can use _arg to add values based on the input coming into the top argument port.

Size

Returns the size of the structure or value passed to the component. If the input is a character string, the operator outputs the number of characters. If the input is an array, the operator outputs the number of elements in the array.

Resources