Added in v2.7.0. It is currently in technical preview stage.
REFRESH TABLE command manually triggers a full reload of data from the external source for tables configured with the FULL_RELOAD refresh mode. This is useful when you need to immediately update the table data without waiting for the next scheduled refresh, or when you want complete control by not setting a refresh interval.
When a table is created with refresh_mode = 'FULL_RELOAD', it can be configured to automatically refresh at a specified interval using the refresh_interval_sec parameter. The REFRESH TABLE command allows you to trigger an additional refresh on demand. If you omit refresh_interval_sec, the table will only refresh when you manually execute REFRESH TABLE, giving you complete control over when data is loaded.
Each refresh pulls the latest Iceberg snapshot and applies any delete files (PositionDeletes and EqualityDeletes) to ensure accurate query results.
Syntax
Parameters
| Parameter | Description |
|---|---|
table_name | The name of the table to refresh. The table must be created with refresh_mode = 'FULL_RELOAD'. |
Examples
- Periodic refresh with scheduled interval
FULL_RELOAD refresh mode for scheduled automatic refreshes:
- Manual-only refresh without scheduled interval
FULL_RELOAD refresh mode but without refresh_interval_sec for manual-only refreshes:
Monitor refresh status
You can monitor the status of refresh operations using therw_catalog.rw_refresh_table_state system catalog:
table_id: The unique identifier of the tablecurrent_status: The current status of the refresh job (e.g.,IDLE,REFRESHING)last_trigger_time: The timestamp of the last refresh operationlast_success_time: The timestamp when the refresh last completed successfullytrigger_interval_secs: The configured refresh interval in seconds