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
| Parameter | Type | Description |
|---|---|---|
| table | Table | The table from which to retrieve the data index. |
| createIfAbsent | boolean | If |
| keyColumnNames | String... | The name(s) of the key column(s) defining the index (varargs). |
| keyColumnNames | String[] | 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
Related documentation
- Create data indexes
hasDataIndexgetOrCreateDataIndex(To be created)DataIndexerJavadoc