public class UpdateConfig extends Object implements Operation
This class has been updated to use the new UpdateMap pattern for all metadata updates.
The old API methods are deprecated but still supported for backward compatibility.
UpdateConfig.builder()
.upsertValues(Map.of("key1", "value1", "key2", "value2"))
.deleteKeys(List.of("old_key1", "old_key2"))
.schemaMetadata(Map.of("schema_key", "schema_value"))
.fieldMetadata(Map.of(0, Map.of("field_key", "field_value")))
.build();
// For config updates (combines upsert and delete)
UpdateMap configUpdates = UpdateMap.builder()
.updates(Map.of("key1", "value1", "key2", "value2", "old_key1", null, "old_key2", null))
.replace(false) // false = incremental updates, true = replace all
.build();
// For table metadata (new feature!)
UpdateMap tableMetadata = UpdateMap.builder()
.updates(Map.of("dataset_description", "My dataset", "version", "1.0"))
.replace(false)
.build();
// For schema metadata
UpdateMap schemaMetadata = UpdateMap.builder()
.updates(Map.of("schema_key", "schema_value"))
.replace(false)
.build();
// For field metadata
UpdateMap field0Metadata = UpdateMap.builder()
.updates(Map.of("field_key", "field_value"))
.replace(false)
.build();
UpdateConfig.builder()
.configUpdates(configUpdates)
.tableMetadataUpdates(tableMetadata) // NEW: Table-level metadata
.schemaMetadataUpdates(schemaMetadata)
.fieldMetadataUpdates(Map.of(0, field0Metadata))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
UpdateConfig.Builder |
| Modifier and Type | Method and Description |
|---|---|
static UpdateConfig.Builder |
builder() |
UpdateMap |
configUpdates() |
Optional<List<String>> |
deleteKeys()
Deprecated.
Use
configUpdates() instead. This method extracts delete keys from the new
UpdateMap structure. |
Optional<Map<Integer,Map<String,String>>> |
fieldMetadata()
Deprecated.
Use
fieldMetadataUpdates() instead. This method converts from the new
UpdateMap structure. |
Map<Integer,UpdateMap> |
fieldMetadataUpdates() |
String |
name()
We use this name to align with the Rust operation enum underlying in JNI.
|
Optional<Map<String,String>> |
schemaMetadata()
Deprecated.
Use
schemaMetadataUpdates() instead. This method extracts updates from the
new UpdateMap structure. |
UpdateMap |
schemaMetadataUpdates() |
UpdateMap |
tableMetadataUpdates() |
String |
toString() |
Optional<Map<String,String>> |
upsertValues()
Deprecated.
Use
configUpdates() instead. This method extracts upsert values from the
new UpdateMap structure. |
public UpdateMap configUpdates()
public UpdateMap tableMetadataUpdates()
public UpdateMap schemaMetadataUpdates()
@Deprecated public Optional<Map<String,String>> upsertValues()
configUpdates() instead. This method extracts upsert values from the
new UpdateMap structure.@Deprecated public Optional<List<String>> deleteKeys()
configUpdates() instead. This method extracts delete keys from the new
UpdateMap structure.@Deprecated public Optional<Map<String,String>> schemaMetadata()
schemaMetadataUpdates() instead. This method extracts updates from the
new UpdateMap structure.@Deprecated public Optional<Map<Integer,Map<String,String>>> fieldMetadata()
fieldMetadataUpdates() instead. This method converts from the new
UpdateMap structure.public String name()
Operationpublic static UpdateConfig.Builder builder()
Copyright © 2025. All rights reserved.