Skip to content

Commit 14df3e8

Browse files
authored
Make refresh on-demand a specific section (#290)
1 parent 1c85c18 commit 14df3e8

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

spiceaidocs/docs/data-accelerators/data-refresh.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ For the complete reference, view the `refresh_sql` section of [datasets](../refe
9090
- Selecting a subset of columns isn't supported - the refresh SQL needs to start with `SELECT * FROM {name}`.
9191
- Queries for data that have been filtered out will not fall back to querying against the federated table.
9292
- Refresh SQL modifications made via API are temporary and will revert after a runtime restart.
93+
9394
:::
9495

9596
### Refresh Data Window
@@ -165,15 +166,23 @@ datasets:
165166

166167
This configuration will refresh `eth.recent_blocks` data every 10 seconds.
167168

168-
Accelerated datasets can also be refreshed on-demand via the `refresh` CLI command or `POST /v1/datasets/:name/acceleration/refresh` API endpoint.
169+
## Refresh On-Demand
170+
171+
Accelerated datasets can be refreshed on-demand via the `refresh` CLI command or `POST /v1/datasets/:name/acceleration/refresh` API endpoint.
169172

170-
An example using cURL:
173+
CLI example:
174+
175+
```bash
176+
spice refresh eth_recent_blocks
177+
```
178+
179+
API example using cURL:
171180

172181
```bash
173182
curl -i -XPOST 127.0.0.1:3000/v1/datasets/eth_recent_blocks/refresh
174183
```
175184

176-
And response
185+
with response:
177186

178187
```bash
179188
HTTP/1.1 201 Created
@@ -183,8 +192,9 @@ date: Thu, 11 Apr 2024 20:11:18 GMT
183192
184193
{"message":"Dataset refresh triggered for eth_recent_blocks."}
185194
```
195+
186196
## Retention Policy
187197

188198
A retention policy automatically removes data from accelerated datasets with a temporal column that exceeds the defined retention period, optimizing resource utilization.
189199

190-
The policy is set using the [`acceleration.retention_check_enabled`](/reference/spicepod/datasets#accelerationretention_check_enabled), [`acceleration.retention_period`](/reference/spicepod/datasets#accelerationretention_period) and [`acceleration.retention_check_interval`](/reference/spicepod/datasets#accelerationretention_check_interval) parameters, along with the [`time_column`](/reference/spicepod/datasets#time_column) and [`time_format`](/reference/spicepod/datasets#time_format) dataset parameters.
200+
The policy is set using the [`acceleration.retention_check_enabled`](/reference/spicepod/datasets#accelerationretention_check_enabled), [`acceleration.retention_period`](/reference/spicepod/datasets#accelerationretention_period) and [`acceleration.retention_check_interval`](/reference/spicepod/datasets#accelerationretention_check_interval) parameters, along with the [`time_column`](/reference/spicepod/datasets#time_column) and [`time_format`](/reference/spicepod/datasets#time_format) dataset parameters.

0 commit comments

Comments
 (0)