pub struct IcebergReaderConfig {
pub mode: IcebergIngestMode,
pub timestamp_column: Option<String>,
pub snapshot_filter: Option<String>,
pub snapshot_id: Option<i64>,
pub datetime: Option<String>,
pub metadata_location: Option<String>,
pub table_name: Option<String>,
pub catalog_type: Option<IcebergCatalogType>,
pub glue_catalog_config: GlueCatalogConfig,
pub rest_catalog_config: RestCatalogConfig,
pub fileio_config: HashMap<String, String>,
}Expand description
Iceberg input connector configuration.
Fields§
§mode: IcebergIngestModeTable read mode.
timestamp_column: Option<String>Table column that serves as an event timestamp.
When this option is specified, and mode is one of snapshot or snapshot_and_follow,
table rows are ingested in the timestamp order, respecting the
LATENESS
property of the column: each ingested row has a timestamp no more than LATENESS
time units earlier than the most recent timestamp of any previously ingested row.
The ingestion is performed by partitioning the table into timestamp ranges of width
LATENESS. Each range is processed sequentially, in increasing timestamp order.
§Example
Consider a table with timestamp column of type TIMESTAMP and lateness attribute
INTERVAL 1 DAY. Assuming that the oldest timestamp in the table is
2024-01-01T00:00:00``, the connector will fetch all records with timestamps from 2024-01-01, then all records for 2024-01-02, 2024-01-03`, etc., until all records
in the table have been ingested.
§Requirements
- The timestamp column must be of a supported type: integer,
DATE, orTIMESTAMP. - The timestamp column must be declared with non-zero
LATENESS. - For efficient ingest, the table must be optimized for timestamp-based queries using partitioning, Z-ordering, or liquid clustering.
snapshot_filter: Option<String>Optional row filter.
This option is only valid when mode is set to snapshot or snapshot_and_follow.
When specified, only rows that satisfy the filter condition are included in the
snapshot. The condition must be a valid SQL Boolean expression that can be used in
the where clause of the select * from snapshot where ... query.
This option can be used to specify the range of event times to include in the snapshot,
e.g.: ts BETWEEN '2005-01-01 00:00:00' AND '2010-12-31 23:59:59'.
snapshot_id: Option<i64>Optional snapshot id.
When this option is set, the connector finds the specified snapshot of the table.
In snapshot and snapshot_and_follow modes, it loads this snapshot.
In follow and snapshot_and_follow modes, it follows table updates
after this snapshot.
Note: at most one of snapshot_id and datetime options can be specified.
When neither of the two options is specified, the latest committed version of the table
is used.
datetime: Option<String>Optional timestamp for the snapshot in the ISO-8601/RFC-3339 format, e.g., “2024-12-09T16:09:53+00:00”.
When this option is set, the connector finds and opens the snapshot of the table as of the
specified point in time (based on the server time recorded in the transaction
log, not the event time encoded in the data). In snapshot and snapshot_and_follow
modes, it retrieves this snapshot. In follow and snapshot_and_follow modes, it
follows transaction log records after this snapshot.
Note: at most one of snapshot_id and datetime options can be specified.
When neither of the two options is specified, the latest committed version of the table
is used.
metadata_location: Option<String>Location of the table metadata JSON file.
This propery is used to access an Iceberg table without a catalog. It is mutually
exclusive with the catalog_type property.
table_name: Option<String>Specifies the Iceberg table name in the “namespace.table” format.
This option is applicable when an Iceberg catalog is configured using the catalog_type property.
catalog_type: Option<IcebergCatalogType>Specifies the catalog type used to access the Iceberg table.
Supported options include “rest” and “glue”. This property is mutually exclusive with metadata_location.
glue_catalog_config: GlueCatalogConfig§rest_catalog_config: RestCatalogConfig§fileio_config: HashMap<String, String>Storage options for configuring backend object store.
See the list of available options in PyIceberg documentation.
Implementations§
Source§impl IcebergReaderConfig
impl IcebergReaderConfig
pub fn validate_catalog_config(&self) -> Result<(), String>
Sourcepub fn validate_glue_catalog_config(&self) -> Result<(), String>
pub fn validate_glue_catalog_config(&self) -> Result<(), String>
Reject Glue catalog config properties when ‘catalog_type’ isn’t set to ‘glue’.
Sourcepub fn validate_rest_catalog_config(&self) -> Result<(), String>
pub fn validate_rest_catalog_config(&self) -> Result<(), String>
Reject Rest catalog config when ‘catalog_type’ isn’t set to ‘rest’.
Sourcepub fn validate_table_name(&self) -> Result<(), String>
pub fn validate_table_name(&self) -> Result<(), String>
Table name must be configured iff ‘catalog_type’ is set.
Sourcepub fn validate_metadata_location(&self) -> Result<(), String>
pub fn validate_metadata_location(&self) -> Result<(), String>
‘metadata_location’ must be configured iff ‘catalog_type’ is set.
Trait Implementations§
Source§impl Clone for IcebergReaderConfig
impl Clone for IcebergReaderConfig
Source§fn clone(&self) -> IcebergReaderConfig
fn clone(&self) -> IcebergReaderConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IcebergReaderConfig
impl Debug for IcebergReaderConfig
Source§impl<'de> Deserialize<'de> for IcebergReaderConfig
impl<'de> Deserialize<'de> for IcebergReaderConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for IcebergReaderConfig
impl PartialEq for IcebergReaderConfig
Source§impl Serialize for IcebergReaderConfig
impl Serialize for IcebergReaderConfig
Source§impl<'__s> ToSchema<'__s> for IcebergReaderConfig
impl<'__s> ToSchema<'__s> for IcebergReaderConfig
impl Eq for IcebergReaderConfig
impl StructuralPartialEq for IcebergReaderConfig
Auto Trait Implementations§
impl Freeze for IcebergReaderConfig
impl RefUnwindSafe for IcebergReaderConfig
impl Send for IcebergReaderConfig
impl Sync for IcebergReaderConfig
impl Unpin for IcebergReaderConfig
impl UnsafeUnpin for IcebergReaderConfig
impl UnwindSafe for IcebergReaderConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.