Class DerivedTableWriter
Table
to Deephaven storage using an in-worker DataImportServer.
This utility is intended to read one live table from storage, perform query operations, and then write a derived live table to storage.
The source table must be either a blink
table or an
add-only
table. Each new row is persisted by the DIS.
To ensure exactly-once delivery, your input table must have a column of ascending sequence numbers specified using
the DerivedTableWriter.Options.sequenceColumn
. If you do not have a sequence column, then upon restart rows may be logged twice.
If your source table is ephemeral, then even with a sequence number rows may be dropped on restart. As an
alternative, you may also read the derived table and extract a sequence number, timestamp, or other information that
can be used to resume your source appropriately before starting the DerivedTableWriter.
When processing independent partitions, using the
ingestPartitionedTable(String, String, DataImportServer, PartitionedTable, PartitionedOptions, Options)
is
recommended. Each constituent is independently logged as an output partition.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents Options for ingesting a table to a DIS partition.static class
Represents options for partitioned table ingestion. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LivenessArtifact
ingestPartitionedTable
(@NotNull String namespace, @NotNull String tableName, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.dataimport.logtailer.DataImportServer dis, @NotNull PartitionedTable sourcePartitionedTable, @NotNull DerivedTableWriter.PartitionedOptions partitionedOptions, @NotNull DerivedTableWriter.Options options) Ingest aPartitionedTable
to an in-worker DIS.static LivenessArtifact
ingestTable
(@NotNull String namespace, @NotNull String tableName, @NotNull String columnPartition, @NotNull String internalPartition, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.dataimport.logtailer.DataImportServer dis, @NotNull Table sourceTable, @NotNull DerivedTableWriter.Options options) Ingest aTable
to an in-worker DIS.
-
Constructor Details
-
DerivedTableWriter
public DerivedTableWriter()
-
-
Method Details
-
ingestTable
public static LivenessArtifact ingestTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull @NotNull String columnPartition, @NotNull @NotNull String internalPartition, @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.dataimport.logtailer.DataImportServer dis, @NotNull @NotNull Table sourceTable, @NotNull @NotNull DerivedTableWriter.Options options) Ingest aTable
to an in-worker DIS.- Parameters:
namespace
- the namespace of the table to ingesttableName
- the name of the table to ingestcolumnPartition
- the column partition to ingest tointernalPartition
- the internal partition to ingest todis
- aDataImportServer
instance, generally created withDataImportServerTools.getDisByName(String)
orDataImportServerTools.getDisByNameWithStorage(String, String)
sourceTable
- the table to ingestoptions
- anDerivedTableWriter.Options
object that control ingestion behavior- Returns:
- a
LivenessArtifact
that must be retained to ensure liveness
-
ingestPartitionedTable
public static LivenessArtifact ingestPartitionedTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.dataimport.logtailer.DataImportServer dis, @NotNull @NotNull PartitionedTable sourcePartitionedTable, @NotNull @NotNull DerivedTableWriter.PartitionedOptions partitionedOptions, @NotNull @NotNull DerivedTableWriter.Options options) Ingest aPartitionedTable
to an in-worker DIS.- Parameters:
namespace
- the namespace of the table to ingesttableName
- the name of the table to ingestdis
- aDataImportServer
instance, generally created withDataImportServerTools.getDisByName(String)
orDataImportServerTools.getDisByNameWithStorage(String, String)
sourcePartitionedTable
- the PartitionedTable to ingestpartitionedOptions
- aDerivedTableWriter.PartitionedOptions
object that controls ingestion behavior across partitionsoptions
- anDerivedTableWriter.Options
object that controls ingestion behavior for individual partitions- Returns:
- a
LivenessArtifact
that must be retained to ensure liveness
-