Struct iceberg_rust::table::table_builder::TableBuilder
source · pub struct TableBuilder { /* private fields */ }
Expand description
Builder pattern to create a table
Implementations§
Methods from Deref<Target = TableMetadataBuilder>§
sourcepub fn format_version(
&mut self,
value: FormatVersion
) -> &mut TableMetadataBuilder
pub fn format_version( &mut self, value: FormatVersion ) -> &mut TableMetadataBuilder
Integer Version for the format.
sourcepub fn table_uuid(&mut self, value: Uuid) -> &mut TableMetadataBuilder
pub fn table_uuid(&mut self, value: Uuid) -> &mut TableMetadataBuilder
A UUID that identifies the table
sourcepub fn location<VALUE>(&mut self, value: VALUE) -> &mut TableMetadataBuilder
pub fn location<VALUE>(&mut self, value: VALUE) -> &mut TableMetadataBuilder
Location tables base location
sourcepub fn last_sequence_number(&mut self, value: i64) -> &mut TableMetadataBuilder
pub fn last_sequence_number(&mut self, value: i64) -> &mut TableMetadataBuilder
The tables highest sequence number
sourcepub fn last_updated_ms(&mut self, value: i64) -> &mut TableMetadataBuilder
pub fn last_updated_ms(&mut self, value: i64) -> &mut TableMetadataBuilder
Timestamp in milliseconds from the unix epoch when the table was last updated.
sourcepub fn last_column_id(&mut self, value: i32) -> &mut TableMetadataBuilder
pub fn last_column_id(&mut self, value: i32) -> &mut TableMetadataBuilder
An integer; the highest assigned column ID for the table.
sourcepub fn schemas(
&mut self,
value: HashMap<i32, Schema>
) -> &mut TableMetadataBuilder
pub fn schemas( &mut self, value: HashMap<i32, Schema> ) -> &mut TableMetadataBuilder
A list of schemas, stored as objects with schema-id.
sourcepub fn with_schema<VALUE>(&mut self, item: VALUE) -> &mut TableMetadataBuilder
pub fn with_schema<VALUE>(&mut self, item: VALUE) -> &mut TableMetadataBuilder
A list of schemas, stored as objects with schema-id.
sourcepub fn current_schema_id(&mut self, value: i32) -> &mut TableMetadataBuilder
pub fn current_schema_id(&mut self, value: i32) -> &mut TableMetadataBuilder
ID of the table’s current schema.
sourcepub fn partition_specs(
&mut self,
value: HashMap<i32, PartitionSpec>
) -> &mut TableMetadataBuilder
pub fn partition_specs( &mut self, value: HashMap<i32, PartitionSpec> ) -> &mut TableMetadataBuilder
A list of partition specs, stored as full partition spec objects.
sourcepub fn with_partition_spec<VALUE>(
&mut self,
item: VALUE
) -> &mut TableMetadataBuilder
pub fn with_partition_spec<VALUE>( &mut self, item: VALUE ) -> &mut TableMetadataBuilder
A list of partition specs, stored as full partition spec objects.
sourcepub fn default_spec_id(&mut self, value: i32) -> &mut TableMetadataBuilder
pub fn default_spec_id(&mut self, value: i32) -> &mut TableMetadataBuilder
ID of the “current” spec that writers should use by default.
sourcepub fn last_partition_id(&mut self, value: i32) -> &mut TableMetadataBuilder
pub fn last_partition_id(&mut self, value: i32) -> &mut TableMetadataBuilder
An integer; the highest assigned partition field ID across all partition specs for the table.
sourcepub fn properties(
&mut self,
value: HashMap<String, String>
) -> &mut TableMetadataBuilder
pub fn properties( &mut self, value: HashMap<String, String> ) -> &mut TableMetadataBuilder
A string to string map of table properties. This is used to control settings that affect reading and writing and is not intended to be used for arbitrary metadata. For example, commit.retry.num-retries is used to control the number of commit retries.
sourcepub fn current_snapshot_id(
&mut self,
value: Option<i64>
) -> &mut TableMetadataBuilder
pub fn current_snapshot_id( &mut self, value: Option<i64> ) -> &mut TableMetadataBuilder
long ID of the current table snapshot; must be the same as the current ID of the main branch in refs.
sourcepub fn snapshots(
&mut self,
value: HashMap<i64, Snapshot>
) -> &mut TableMetadataBuilder
pub fn snapshots( &mut self, value: HashMap<i64, Snapshot> ) -> &mut TableMetadataBuilder
A list of valid snapshots. Valid snapshots are snapshots for which all data files exist in the file system. A data file must not be deleted from the file system until the last snapshot in which it was listed is garbage collected.
sourcepub fn snapshot_log(
&mut self,
value: Vec<SnapshotLog>
) -> &mut TableMetadataBuilder
pub fn snapshot_log( &mut self, value: Vec<SnapshotLog> ) -> &mut TableMetadataBuilder
A list (optional) of timestamp and snapshot ID pairs that encodes changes to the current snapshot for the table. Each time the current-snapshot-id is changed, a new entry should be added with the last-updated-ms and the new current-snapshot-id. When snapshots are expired from the list of valid snapshots, all entries before a snapshot that has expired should be removed.
sourcepub fn metadata_log(
&mut self,
value: Vec<MetadataLog>
) -> &mut TableMetadataBuilder
pub fn metadata_log( &mut self, value: Vec<MetadataLog> ) -> &mut TableMetadataBuilder
A list (optional) of timestamp and metadata file location pairs that encodes changes to the previous metadata files for the table. Each time a new metadata file is created, a new entry of the previous metadata file location should be added to the list. Tables can be configured to remove oldest metadata log entries and keep a fixed-size log of the most recent entries after a commit.
sourcepub fn sort_orders(
&mut self,
value: HashMap<i32, SortOrder>
) -> &mut TableMetadataBuilder
pub fn sort_orders( &mut self, value: HashMap<i32, SortOrder> ) -> &mut TableMetadataBuilder
A list of sort orders, stored as full sort order objects.
sourcepub fn with_sort_order<VALUE>(
&mut self,
item: VALUE
) -> &mut TableMetadataBuilder
pub fn with_sort_order<VALUE>( &mut self, item: VALUE ) -> &mut TableMetadataBuilder
A list of sort orders, stored as full sort order objects.
sourcepub fn default_sort_order_id(&mut self, value: i32) -> &mut TableMetadataBuilder
pub fn default_sort_order_id(&mut self, value: i32) -> &mut TableMetadataBuilder
Default sort order id of the table. Note that this could be used by writers, but is not used when reading because reads use the specs stored in manifest files.
sourcepub fn refs(
&mut self,
value: HashMap<String, SnapshotReference>
) -> &mut TableMetadataBuilder
pub fn refs( &mut self, value: HashMap<String, SnapshotReference> ) -> &mut TableMetadataBuilder
A map of snapshot references. The map keys are the unique snapshot reference names in the table, and the map values are snapshot reference objects. There is always a main branch reference pointing to the current-snapshot-id even if the refs map is null.