Input Table
Input Tables are in-memory Deephaven tables that allow users to manually edit the data in cells. They come in two flavors:
AppendOnlyArrayBackedInputTable
- An append-only table allows users to add rows to the end of the table and does not support edits or deletions.KeyedArrayBackedInputTable
- A keyed table has keys for each row, allowing modification of pre-existing values.
Syntax
Append-Only
AppendOnlyArrayBackedInputTable.make(definition)
AppendOnlyArrayBackedInputTable.make(definition, enumValues)
AppendOnlyArrayBackedInputTable.make(initialTable)
AppendOnlyArrayBackedInputTable.make(initialTable, enumValues)
Keyed
KeyedArrayBackedInputTable.make(definition)
KeyedArrayBackedInputTable.make(definition, enumValues)
KeyedArrayBackedInputTable.make(initialTable)
KeyedArrayBackedInputTable.make(initialTable, enumValues)
Parameters
Parameter | Type | Description |
---|---|---|
definition | TableDefinition | The definition of the new table. |
enumValues | Map<String, Object[]> | A map of column names to enum values. |
initialTable | Table | The initial Table to copy into the append-only or keyed Input Table. |
Returns
An append-only or keyed Input Table.
Examples
In this example, we will create an append-only input table from a source table.
import io.deephaven.engine.table.impl.util.AppendOnlyArrayBackedInputTable
source = newTable(
doubleCol("Doubles", 3.1, 5.45, -1.0),
stringCol("Strings", "Creating", "New", "Tables")
)
result = AppendOnlyArrayBackedInputTable.make(source)
- source
- result
In this example, we will create a keyed input table from a source table.
import io.deephaven.engine.table.impl.util.KeyedArrayBackedInputTable
source = newTable(
doubleCol("Doubles", 3.1, 5.45, -1.0),
stringCol("Strings", "Creating", "New", "Tables")
)
result = KeyedArrayBackedInputTable.make(source, "Strings")
- source
- result
Add data to the table
To manually add data to an input table, simply click on the cell in which you wish to enter data. Type the value into the cell, hit enter, and it will appear.
Added rows are not final until you hit the Commit button.