getDataIndex

Retrieves an existing data index for a given table and specified key column(s). It can optionally create the index if it does not already exist.

This method is part of the io.deephaven.engine.table.impl.indexer.DataIndexer class and is typically used via a static import.

Syntax

Parameters

ParameterTypeDescription
tableTable

The table from which to retrieve the data index.

createIfAbsentboolean

If true, creates the data index if it doesn't exist. If false, returns null if the index doesn't exist.

keyColumnNamesString...

The name(s) of the key column(s) defining the index (varargs).

keyColumnNamesString[]

The name(s) of the key column(s) defining the index (array).

Returns

Returns the DataIndex object if found or created. Returns null if createIfAbsent is false and the index does not exist.

Examples

Example 1: Retrieve an index, don't create if absent

Example 2: Retrieve an index, create if absent