Package io.deephaven.enterprise.merge
Interface BaseMergeOptions.Builder
- Enclosing class:
- BaseMergeOptions
public static interface BaseMergeOptions.Builder
-
Method Summary
Modifier and TypeMethodDescriptiondefault BaseMergeOptions.BuilderaddAllSortColumns(@NotNull Iterable<? extends SortColumn> sortColumns) Set the sort-columns for the merge.addAllSortDirectives(@NotNull Iterable<? extends SortDirective> directives) Set the sort-directives for the merge.default BaseMergeOptions.BuilderaddAllSortOrder(@NotNull Iterable<String> sortOrder) Set the sort-order for the merge.default BaseMergeOptions.BuilderaddSortColumns(@NotNull SortColumn... sortColumns) Set the sort-columns for the merge.addSortDirectives(@NotNull SortDirective... directives) Set the sort-directives for the merge.default BaseMergeOptions.BuilderaddSortOrder(@NotNull String... sortOrder) Set the sort-order for the merge.allowEmptyInput(boolean allowEmptyInput) Specifies if this merge request may be performed using an empty dataset.build()Generates theBaseMergeOptionsbased on the inputs to thisBaseMergeOptions.Builderinstance.Set an optional compression codec name for this merge request.Set the namespace to merge into.default BaseMergeOptions.BuilderpartitionFormula(@NotNull String partitionFormula) Set a valid java formula, which is used to generate a column-partition value to read from for this merge request.default BaseMergeOptions.BuilderpartitionValue(@NotNull String partitionValue) Set the column-partition value to read from for this merge request.partitionValueProvider(@NotNull PartitionValueProvider provider) Set the partition value provider.default BaseMergeOptions.BuildersourceFromDb(@NotNull Database db) Use the providedDatabasealong with the targetBaseMergeOptions.namespace()/BaseMergeOptions.tableName()to resolve the source table.default BaseMergeOptions.BuildersourceFromNamed(@NotNull Database db, @NotNull String sourceNamespace, @NotNull String sourceTableName) Use the providedDatabase, namespace and tableName to resolve the source table.default BaseMergeOptions.BuildersourceTable(@NotNull Table table) Set the source table directly.sourceTableProvider(@NotNull SourceTableProvider provider) Set the source table provider.Set the tableName to merge into.
-
Method Details
-
namespace
Set the namespace to merge into.- Parameters:
namespace- the namespace.- Returns:
- this
BaseMergeOptions.Builder
-
tableName
Set the tableName to merge into.- Parameters:
tableName- the namespace.- Returns:
- this
BaseMergeOptions.Builder
-
sourceTableProvider
@InternalUseOnly BaseMergeOptions.Builder sourceTableProvider(@NotNull @NotNull SourceTableProvider provider) Set the source table provider.- Parameters:
provider- the source table provider.- Returns:
- this
BaseMergeOptions.Builder
-
sourceTable
Set the source table directly.- Parameters:
table- the source table.- Returns:
- this
BaseMergeOptions.Builder
-
sourceFromDb
Use the providedDatabasealong with the targetBaseMergeOptions.namespace()/BaseMergeOptions.tableName()to resolve the source table.- Parameters:
db- the database to use to resolve the source table.- Returns:
- this
BaseMergeOptions.Builder
-
sourceFromNamed
@ScriptApi default BaseMergeOptions.Builder sourceFromNamed(@NotNull @NotNull Database db, @NotNull @NotNull String sourceNamespace, @NotNull @NotNull String sourceTableName) Use the providedDatabase, namespace and tableName to resolve the source table.- Parameters:
db- the database to use to resolve the source table.sourceNamespace- the namespace of the source table.sourceTableName- the tableName of the source table.- Returns:
- this
BaseMergeOptions.Builder
-
allowEmptyInput
Specifies if this merge request may be performed using an empty dataset. False by default.- Parameters:
allowEmptyInput- whether or not this merge request may use an empty dataset.- Returns:
- this
BaseMergeOptions.Builder
-
addAllSortOrder
@ScriptApi default BaseMergeOptions.Builder addAllSortOrder(@NotNull @NotNull Iterable<String> sortOrder) Set the sort-order for the merge. Columns may include grouping-columns, but please note that ordering is done per internal-partition. Each column included in this call will be appended as an ascending-order sort.- Parameters:
sortOrder- the desired sort-ordering for the merge.- Returns:
- this
BaseMergeOptions.Builder
-
addSortOrder
Set the sort-order for the merge. Columns may include grouping-columns, but please note that ordering is done per internal-partition. Each column included in this call will be appended as an ascending-order sort.- Parameters:
sortOrder- the desired sort-ordering for the merge.- Returns:
- this
BaseMergeOptions.Builder
-
addAllSortColumns
@ScriptApi default BaseMergeOptions.Builder addAllSortColumns(@NotNull @NotNull Iterable<? extends SortColumn> sortColumns) Set the sort-columns for the merge. Columns may include grouping-columns, but please note that ordering is done per internal-partition.- Parameters:
sortColumns- the desired sort-ordering for the merge.- Returns:
- this
BaseMergeOptions.Builder
-
addSortColumns
@ScriptApi default BaseMergeOptions.Builder addSortColumns(@NotNull @NotNull SortColumn... sortColumns) Set the sort-columns for the merge. Columns may include grouping-columns, but please note that ordering is done per internal-partition.- Parameters:
sortColumns- the desired sort-ordering for the merge.- Returns:
- this
BaseMergeOptions.Builder
-
addSortDirectives
@ScriptApi BaseMergeOptions.Builder addSortDirectives(@NotNull @NotNull SortDirective... directives) Set the sort-directives for the merge. Please note that ordering is done per internal-partition.- Parameters:
directives- the desired sort-directives for the merge.- Returns:
- this
BaseMergeOptions.Builder
-
addAllSortDirectives
@ScriptApi BaseMergeOptions.Builder addAllSortDirectives(@NotNull @NotNull Iterable<? extends SortDirective> directives) Set the sort-directives for the merge. Please note that ordering is done per internal-partition.- Parameters:
directives- the desired sort-directives for the merge.- Returns:
- this
BaseMergeOptions.Builder
-
codecName
Set an optional compression codec name for this merge request. This is used when writing toDeephavenMergeOptions.StorageFormat.Parquetor to an Iceberg table.- Parameters:
codecName- the name of the desired codec.- Returns:
- this
BaseMergeOptions.Builder
-
partitionValueProvider
@InternalUseOnly BaseMergeOptions.Builder partitionValueProvider(@NotNull @NotNull PartitionValueProvider provider) Set the partition value provider.- Parameters:
provider- the partition table provider.- Returns:
- this
BaseMergeOptions.Builder
-
partitionValue
Set the column-partition value to read from for this merge request. In the case of Deephaven Layout tables, this is also the partition value to write to.- Parameters:
partitionValue- the value to use as the partition.- Returns:
- this
BaseMergeOptions.Builder
-
partitionFormula
@ScriptApi default BaseMergeOptions.Builder partitionFormula(@NotNull @NotNull String partitionFormula) Set a valid java formula, which is used to generate a column-partition value to read from for this merge request. In the case of Deephaven Layout tables, this is also the partition value to write to.- Parameters:
partitionFormula- the java formula used to generate the partition value.- Returns:
- this
BaseMergeOptions.Builder
-
build
BaseMergeOptions build()Generates theBaseMergeOptionsbased on the inputs to thisBaseMergeOptions.Builderinstance.- Returns:
- an immutable instance of
BaseMergeOptions
-