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 classRepresents Options for ingesting a table to a DIS partition.static classRepresents options for partitioned table ingestion. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LivenessArtifactingestPartitionedTable(@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 aPartitionedTableto an in-worker DIS.static LivenessArtifactingestTable(@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 aTableto 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 aTableto 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- aDataImportServerinstance, generally created withDataImportServerTools.getDisByName(String)orDataImportServerTools.getDisByNameWithStorage(String, String)sourceTable- the table to ingestoptions- anDerivedTableWriter.Optionsobject that control ingestion behavior- Returns:
- a
LivenessArtifactthat 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 aPartitionedTableto an in-worker DIS.- Parameters:
namespace- the namespace of the table to ingesttableName- the name of the table to ingestdis- aDataImportServerinstance, generally created withDataImportServerTools.getDisByName(String)orDataImportServerTools.getDisByNameWithStorage(String, String)sourcePartitionedTable- the PartitionedTable to ingestpartitionedOptions- aDerivedTableWriter.PartitionedOptionsobject that controls ingestion behavior across partitionsoptions- anDerivedTableWriter.Optionsobject that controls ingestion behavior for individual partitions- Returns:
- a
LivenessArtifactthat must be retained to ensure liveness
-