Skip to main content

Data access functions

Table projects

When working with two-dimensional (2D) table data, you may need to access specific table regions. Studio automatically creates data access variables that allow you to access specific columns or the whole data table. See Data Access in Table Projects for guidance.

In addition, Studio has many ATL functions for accessing table regions. These functions take a data table or specific table region and return one of the following: (1) a table region that you can subject to further interrogation, (2) a list of values, or (3) a single cell value.

JSON projects

Several ATL functions are specifically for JSON data — see Functions for ATL or JSON Objects.

For more about accessing JSON data, see Data Access in JSON Projects.

Index of data access functions

FUNCTIONS THAT RETURN A TABLE REGION

cell

Selects a cell from a table.

cellInRegion

Selects a cell from a table region.

columns

Selects columns from a table.

columnsInRegion

Selects columns from a table region.

max

Find all cells containing the maximum value.

min

Finds all cells containing the minimum value.

rows

Selects rows from a table.

rowsInRegion

Selects rows from a table region.

sortedColumns

Selects columns from a table and presents them in the selected order.

sortedColumnsInRegion

Selects columns from a table region and presents them in the selected order.

sortedRows

Selects rows from a table and presents them in the selected order.

sortedRowsInRegion

Selects rows from a table region and presents them in the selected order.

FUNCTIONS THAT RETURN A LIST

columnNames

Returns a list of column names in a table.

concat

Concatenates the input values into a single list.

flattenLists

Flattens a list of lists into a single list.

rowNames

Returns a list of row names in a table.

sublist

Returns a sublist of the input list.

unique

Returns a list of unique values (removes duplicates).

FUNCTIONS FOR ATL OR JSON OBJECTS

addToAtlObject

Adds key–value pairs to an ATL object.

createAtlObject

Creates an ATL object from the given keys and values.

hasKey

Tests if the input object contains the given key name.

keys

Returns a list of all keys in a JSON or ATL object.

removeFromAtlObject

Removes key–value pairs from an ATL object.

values

Returns a list of all values in a JSON or ATL object.

FUNCTIONS THAT RETURN OR CONVERT A VALUE

asBoolean

Converts a reserved-list value to a Boolean value.

asList

Converts the input value to a list.

asNumber

Converts a numeric string to a number.

asString

Converts a non-string value to a string.

asTable

Converts the output of a script to a table region. Deprecated — see function topic.

isNumber

Tests if the input value can be parsed as a number.

value

Returns the value in a table cell or single-value list.