Package io.delta.kernel.internal
Class TableConfig<T>
Object
io.delta.kernel.internal.TableConfig<T>
Represents the table properties. Also provides methods to access the property values from the
table metadata.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TableConfig<Boolean>
Whether this Delta table is append-only.static final TableConfig<Boolean>
Enable change data feed output.static final TableConfig<Integer>
How often to checkpoint the delta log? For every N (this config) commits to the log, we will suggest write out a checkpoint file that can speed up the Delta table state reconstruction.static final TableConfig<String>
static final TableConfig<Long>
This table property is used to control the maximum column mapping ID.static final TableConfig<ColumnMapping.ColumnMappingMode>
This table property is used to control the column mapping mode.static final TableConfig<Integer>
The number of columns to collect stats on for data skipping.static final TableConfig<Boolean>
Whether commands modifying this Delta table are allowed to create new deletion vectors.static final TableConfig<Boolean>
Whether to clean up expired checkpoints and delta logs.static final TableConfig<Boolean>
Table property that enables modifying the table in accordance with the Delta-Iceberg Compatibility V2 protocol.static final TableConfig<Boolean>
Table property that enables modifying the table in accordance with the Delta-Iceberg Writer Compatibility V1 (icebergCompatWriterV1
) protocol.static final TableConfig<Optional<Long>>
This table property is used to track the timestamp at whichinCommitTimestamps
were enabled.static final TableConfig<Optional<Long>>
This table property is used to track the version of the table at whichinCommitTimestamps
were enabled.static final TableConfig<Boolean>
This table property is used to track the enablement of theinCommitTimestamps
.static final TableConfig<Long>
The shortest duration we have to keep delta/checkpoint files around before deleting them.static final TableConfig<String>
static final TableConfig<String>
static final TableConfig<Boolean>
Indicates whether Row Tracking is enabled on the table.static final TableConfig<Long>
The shortest duration we have to keep logically deleted data files around before deleting them physically.static final TableConfig<Boolean>
Whether widening the type of an existing column or field is allowed, either manually using ALTER TABLE CHANGE COLUMN or automatically if automatic schema evolution is enabled.static final TableConfig<Set<String>>
Table config that allows for translation of Delta metadata to other table formats metadata.static final TableConfig<Boolean>
Table property that enables modifying the table in accordance with the Delta-Variant Shredding Preview protocol. -
Method Summary
Modifier and TypeMethodDescriptionfromMetadata
(Metadata metadata) Returns the value of the table property from the given metadata.fromMetadata
(Map<String, String> configuration) Returns the value of the table property from the given configuration.getKey()
Returns the key of the table property.validateDeltaProperties
(Map<String, String> newProperties) Validates that the given new properties that the txn is trying to update in table.
-
Field Details
-
APPEND_ONLY_ENABLED
Whether this Delta table is append-only. Files can't be deleted, or values can't be updated. -
CHANGE_DATA_FEED_ENABLED
Enable change data feed output. When enabled, DELETE, UPDATE, and MERGE INTO operations will need to do additional work to output their change data in an efficiently readable format. -
CHECKPOINT_POLICY
-
DELETION_VECTORS_CREATION_ENABLED
Whether commands modifying this Delta table are allowed to create new deletion vectors. -
TYPE_WIDENING_ENABLED
Whether widening the type of an existing column or field is allowed, either manually using ALTER TABLE CHANGE COLUMN or automatically if automatic schema evolution is enabled. -
ROW_TRACKING_ENABLED
Indicates whether Row Tracking is enabled on the table. When this flag is turned on, all rows are guaranteed to have Row IDs and Row Commit Versions assigned to them, and writers are expected to preserve them by materializing them to hidden columns in the data files. -
TOMBSTONE_RETENTION
The shortest duration we have to keep logically deleted data files around before deleting them physically.Note: this value should be large enough:
- It should be larger than the longest possible duration of a job if you decide to run "VACUUM" when there are concurrent readers or writers accessing the table.
- If you are running a streaming query reading from the table, you should make sure the query doesn't stop longer than this value. Otherwise, the query may not be able to restart as it still needs to read old files.
-
CHECKPOINT_INTERVAL
How often to checkpoint the delta log? For every N (this config) commits to the log, we will suggest write out a checkpoint file that can speed up the Delta table state reconstruction. -
LOG_RETENTION
The shortest duration we have to keep delta/checkpoint files around before deleting them. We can only delete delta files that are before a checkpoint. -
EXPIRED_LOG_CLEANUP_ENABLED
Whether to clean up expired checkpoints and delta logs. -
IN_COMMIT_TIMESTAMPS_ENABLED
This table property is used to track the enablement of theinCommitTimestamps
.When enabled, commit metadata includes a monotonically increasing timestamp that allows for reliable TIMESTAMP AS OF time travel even if filesystem operations change a commit file's modification timestamp.
-
IN_COMMIT_TIMESTAMP_ENABLEMENT_VERSION
This table property is used to track the version of the table at whichinCommitTimestamps
were enabled. -
IN_COMMIT_TIMESTAMP_ENABLEMENT_TIMESTAMP
This table property is used to track the timestamp at whichinCommitTimestamps
were enabled. More specifically, it is theinCommitTimestamps
of the commit with the version specified inIN_COMMIT_TIMESTAMP_ENABLEMENT_VERSION
. -
COLUMN_MAPPING_MODE
This table property is used to control the column mapping mode. -
COLUMN_MAPPING_MAX_COLUMN_ID
This table property is used to control the maximum column mapping ID. -
ICEBERG_COMPAT_V2_ENABLED
Table property that enables modifying the table in accordance with the Delta-Iceberg Compatibility V2 protocol.- See Also:
-
DATA_SKIPPING_NUM_INDEXED_COLS
The number of columns to collect stats on for data skipping. A value of -1 means collecting stats for all columns.For Struct types, all leaf fields count individually toward this limit in depth-first order. For example, if a table has columns a, b.c, b.d, and e, then the first three indexed columns would be a, b.c, and b.d. Map and array types are not supported for statistics collection.
-
ICEBERG_WRITER_COMPAT_V1_ENABLED
Table property that enables modifying the table in accordance with the Delta-Iceberg Writer Compatibility V1 (icebergCompatWriterV1
) protocol. -
UNIVERSAL_FORMAT_ENABLED_FORMATS
Table config that allows for translation of Delta metadata to other table formats metadata. -
VARIANT_SHREDDING_ENABLED
Table property that enables modifying the table in accordance with the Delta-Variant Shredding Preview protocol.- See Also:
-
MATERIALIZED_ROW_ID_COLUMN_NAME
-
MATERIALIZED_ROW_COMMIT_VERSION_COLUMN_NAME
-
-
Method Details
-
validateDeltaProperties
Validates that the given new properties that the txn is trying to update in table. Properties that have `delta.` prefix in the key name should be in valid list and are editable. The caller is expected to store the returned properties in the table metadata after further validation from a protocol point of view. The returned properties will have the key's case normalized as defined in itsTableConfig
.- Parameters:
newProperties
- the properties to validate- Throws:
InvalidConfigurationValueException
- if any of the properties are invalidUnknownConfigurationException
- if any of the properties are unknown
-
fromMetadata
Returns the value of the table property from the given metadata.- Parameters:
metadata
- the table metadata- Returns:
- the value of the table property
-
fromMetadata
Returns the value of the table property from the given configuration.- Parameters:
configuration
- the table configuration- Returns:
- the value of the table property
-
getKey
Returns the key of the table property.- Returns:
- the key of the table property
-