> ## Documentation Index
> Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# REFRESH TABLE

> Use the `REFRESH TABLE` command to manually trigger a refresh operation for tables created with the FULL_RELOAD refresh mode.

<Note>
  Added in v2.7.0. It is currently in **[technical preview](/changelog/product-lifecycle#product-release-lifecycle)** stage.
</Note>

The `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

```sql theme={null}
REFRESH TABLE table_name;
```

## Parameters

| Parameter    | Description                                                                                      |
| :----------- | :----------------------------------------------------------------------------------------------- |
| `table_name` | The name of the table to refresh. The table must be created with `refresh_mode = 'FULL_RELOAD'`. |

## Examples

1. Periodic refresh with scheduled interval

Create a table with the `FULL_RELOAD` refresh mode for scheduled automatic refreshes:

```sql theme={null}
CREATE TABLE iceberg_batch_table (
    id int primary key,
    name varchar
) WITH (
    connector = 'iceberg',
    catalog.type = 'storage',
    warehouse.path = 's3://my-data-lake/warehouse',
    table.name = 'my_iceberg_table',
    database.name = 'public',
    s3.access.key = 'your-access-key',
    s3.secret.key = 'your-secret-key',
    s3.region = 'us-west-2',
    refresh_mode = 'FULL_RELOAD',
    refresh_interval_sec = '60'  -- Automatically refresh every 60 seconds
);
```

Manually trigger a refresh:

```sql theme={null}
REFRESH TABLE iceberg_batch_table;
```

2. Manual-only refresh without scheduled interval

Create a table with the `FULL_RELOAD` refresh mode but without `refresh_interval_sec` for manual-only refreshes:

```sql theme={null}
CREATE TABLE iceberg_manual_table (
    id int primary key,
    name varchar
) WITH (
    connector = 'iceberg',
    catalog.type = 'storage',
    warehouse.path = 's3://hummock001/iceberg_connection',
    table.name = 't_refresh',
    database.name = 'public',
    s3.access.key = secret my_secret,
    s3.secret.key = secret my_secret,
    s3.endpoint = 'http://127.0.0.1:9301',
    s3.region = 'us-west-2',
    refresh_mode = 'FULL_RELOAD'  -- No refresh_interval_sec means manual-only
);
```

Manually trigger a refresh (required to load data):

```sql theme={null}
REFRESH TABLE iceberg_manual_table;
```

## Monitor refresh status

You can monitor the status of refresh operations using the `rw_catalog.rw_refresh_table_state` system catalog:

```sql theme={null}
SELECT table_id, current_status, last_trigger_time, last_success_time, trigger_interval_secs
FROM rw_catalog.rw_refresh_table_state;
```

This query returns information about all refreshable tables, including:

* `table_id`: The unique identifier of the table
* `current_status`: The current status of the refresh job (e.g., `IDLE`, `REFRESHING`)
* `last_trigger_time`: The timestamp of the last refresh operation
* `last_success_time`: The timestamp when the refresh last completed successfully
* `trigger_interval_secs`: The configured refresh interval in seconds

## Related topics

* [Ingest data from Iceberg tables](/iceberg/ingest-from-iceberg)
* [RisingWave catalogs](/sql/system-catalogs/rw-catalog)
