IcebergReadInstructions
The IcebergReadInstructions class specifies the instructions for reading Iceberg tables into Deephaven. These include column renames, table definitions, and special instructions for loading files from cloud storage.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| table_definition | Union[Dict[str, DType], List[Column]] | The table definition. If not given, the definition is inferred from the Iceberg schema. Setting a definition guarantees the returned table has the given definition. This is mostly used to specify a subset of Iceberg schema columns. |
| data_instructions | S3Instructions | Special instructions for reading data files from S3 cloud storage. |
| column_renames | Dict[str, str] | A mapping of old to new column names for the table. If not given, the column names are the same as the Iceberg schema. |
| update_mode | IcebergUpdateMode | The update mode for the table. Options include:
|
| snapshot_id | int | The snapshot ID to read. If not given, the most recent snapshot ID is used. |
Methods
None.
Constructors
An IcebergReadInstructions is constructed directly from the class.
Examples
The following example creates an IcebergReadInstructions object that renames Iceberg columns region and item_type to Area and Category in Deephaven, respectively:
The following example creates an IcebergReadInstructions object that renames columns as well as specifies the table definition:
The following example creates four IcebergReadInstructions objects. The first is for static Iceberg tables, the second is for Iceberg tables that can be manually refreshed, and the third and fourth are for Iceberg tables that will be refreshed automatically. The third uses the default value of 60 seconds, whereas the fourth sets the interval to 30 seconds.
The following example creates an IcebergReadInstructions object that tells a catalog adapter about the region, access information, and endpoint for reading Iceberg tables from S3 cloud storage: