Skip to main content
Version: Python

IcebergUpdateMode

The IcebergUpdateMode class specifies the update mode for an Iceberg table to be loaded into Deephaven. There are three available update modes. Users will specify one of the modes when reading Iceberg data into Deephaven tables to determine the static or refreshing nature of the table.

Constructors

An IcebergUpdateMode is constructed from one of its methods.

Methods

  • static: Specifies that the Iceberg table should be loaded once and not refreshed.
  • manual_refresh: Specifies that the Iceberg table should be loaded once and refreshed manually.
  • auto_refresh: Specifies that the Iceberg table should be loaded once and refreshed automatically. A refresh interval in milliseconds can be specified. The default is 60 seconds.

Examples

The following code block creates creates four different custom IcebergReadInstructions that set the update mode to static, manual_refresh, and auto_refresh.

from deephaven.experimental import iceberg

static_mode = iceberg.IcebergUpdateMode.static()
manual_refresh_mode = iceberg.IcebergUpdateMode.manual_refresh()
auto_refresh_mode_60s = iceberg.IcebergUpdateMode.auto_refresh()
auto_refresh_mode_30s = iceberg.IcebergUpdateMode.auto_refresh(auto_refresh_ms=30000)

static_instructions = iceberg.IcebergReadInstructions(update_mode=static_mode)
manual_refresh_instructions = iceberg.IcebergReadInstructions(
update_mode=manual_refresh_mode
)
auto_refresh_instructions_60s = iceberg.IcebergReadInstructions(
update_mode=auto_refresh_mode_60s
)
auto_refresh_instructions_30s = iceberg.IcebergReadInstructions(
update_mode=auto_refresh_mode_30s
)