Class DerivedTableWriter.Options
- Enclosing class:
- DerivedTableWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchunkSize
(int chunkSize) How many rows should be read at one time? (defaults to 4096)lastBy
(String name, Collection<String> keyColumnNames) Specify that this DIS should produce a lastBy view of the table with the given key columns using aCoreLastByTableImportState
under the hood.lastBy
(Collection<String> keyColumnNames) Specify that this DIS should produce a lastBy view of the table with the given key columns using aCoreLastByTableImportState
under the hood.logInitial
(boolean logInitial) Should the initial image of the table be logged?sequenceColumn
(String sequenceColumn) Specify a column in the source table that contains a sequence number.transactionsEnabled
(boolean transactionsEnabled) Should transactions be enabled for each set of data written? (defaults to false)
-
Constructor Details
-
Options
public Options()
-
-
Method Details
-
sequenceColumn
Specify a column in the source table that contains a sequence number.If ingestion is interrupted, on resume the last commited sequence number is read from the Deephaven checkpoint record, and records less than or equal to that sequence number are discarded. The sequence number must be ascending, ingestion fails if the the sequence number does not increase on each row. The sequence number need not be sequential, gaps are ignored. This allows you to filter a table before logging it.
If you do not specify a sequence number, then all new rows presented to the ingester are ingested on startup. If you are deriving data, for example from an add-only table, then without a sequence number data is duplicated on restart.
- Parameters:
sequenceColumn
- the column name of the sequence number- Returns:
- this Options structure
-
transactionsEnabled
Should transactions be enabled for each set of data written? (defaults to false)A Deephaven transaction ensures that a set of rows are written and presented to downstream queries atomically. If you have data that has meaning across rows (e.g., snapshots of positions), then you should enable transactions on the derived table. This is only meaningful if your source data is also presented atomically.
- Parameters:
transactionsEnabled
- true to enable transactions, false to disable transactions- Returns:
- this Options structure
-
logInitial
Should the initial image of the table be logged?- Parameters:
logInitial
- true to log the initial rows in the table, false to only log new rows- Returns:
- this Options structure
-
chunkSize
How many rows should be read at one time? (defaults to 4096)- Parameters:
chunkSize
- the size of chunks (in rows) to be read from the source table and written to the destination table- Returns:
- this Options structure
-
lastBy
Specify that this DIS should produce a lastBy view of the table with the given key columns using aCoreLastByTableImportState
under the hood.- Parameters:
name
- the name of the lastBy viewkeyColumnNames
- the key columns for the lastBy view- Returns:
- this builder
-
lastBy
Specify that this DIS should produce a lastBy view of the table with the given key columns using aCoreLastByTableImportState
under the hood.- Parameters:
keyColumnNames
- the key columns for the lastBy view- Returns:
- this builder
-