Cookbook recipes to get up and running with Spice.ai quickly 🚀
Works with v2.0+
Spice supports specifying cron schedules for accelerated datasets, to refresh datasets on defined schedules.
Follow this recipe to schedule a dataset to refresh on a cron schedule.
Tip: Open and refer to the Data Refresh (opens in a new tab) documentation while completing this recipe.
First ensure the Spice CLI is installed. If not, follow the Spice Getting Started (opens in a new tab) guide to install.
The Spice Runtime will start and the taxi_trips dataset included in the spiceai/quickstart Spicepod will be loaded.
Stop the Spice Runtime using Ctrl-C. In a code or text editor, open spicepods/spiceai/quickstart/spicepod.yaml.
In the acceleration section, add a refresh_cron parameter with a value of */30 * * * * * to refresh every 30th second.
The spicepod.yaml should be as below:
Save the file, and restart the Spice runtime:
After the initial load, observe that the taxi_trips dataset refreshes on every 30th second: