### Start Spice.ai Runtime and Verify Output
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spice-java-sdk-sample/README.md
Execute this command to start the local Spice.ai runtime, which is essential for data querying. The accompanying output demonstrates a successful startup, including the initialization of various services and the loading of the 'taxi_trips' dataset.
```shell
spice run
```
```shell
Spice.ai runtime starting...
2024-07-16T19:16:34.192387Z INFO spiced: Metrics listening on 127.0.0.1:9090
2024-07-16T19:16:34.195177Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
2024-07-16T19:16:34.197072Z INFO runtime: Initialized results cache; max size: 128.00 MiB, item ttl: 1s
2024-07-16T19:16:34.197759Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090
2024-07-16T19:16:34.197770Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051
2024-07-16T19:16:34.885084Z INFO runtime: Dataset taxi_trips registered (s3://spiceai-demo-datasets/taxi_trips/2024/), acceleration (arrow, 10s refresh), results cache enabled.
2024-07-16T19:16:34.886257Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset taxi_trips
2024-07-16T19:16:40.494038Z INFO runtime::accelerated_table::refresh_task: Loaded 2,964,624 rows (421.71 MiB) for dataset taxi_trips in 5s 607ms.
```
--------------------------------
### Start Spice Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/text-to-sql/README.md
Initiates the Spice runtime environment, which is necessary to access its services, including the text-to-SQL endpoint.
```bash
spice run
```
--------------------------------
### Start Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/duckdb/accelerator/README.md
Starts the Spice.ai runtime, which loads and makes configured datasets available for querying. This command initiates the local Spice.ai services.
```bash
spice run
```
--------------------------------
### Query Quickstart Catalog Data with Spice SQL CLI
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/spiceai/README.md
This bash example demonstrates interacting with the Spice.ai Cloud Platform using the `spice sql` command-line tool. It first shows how to list all available tables, confirming the presence of `taxi_trips` from the `quickstart` catalog, and then executes a SQL query to retrieve specific columns from the `taxi_trips` table, showcasing data access.
```bash
spice sql
sql> show tables;
+---------------+--------------+--------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------+--------------+------------+
| spiceai | tpch | partsupp | BASE TABLE |
| spiceai | tpch | part | BASE TABLE |
| spiceai | tpch | supplier | BASE TABLE |
| quickstart | public | taxi_trips | BASE TABLE |
| spice | runtime | task_history | BASE TABLE |
| spice | runtime | metrics | BASE TABLE |
+---------------+--------------+--------------+------------+
Time: 0.011640125 seconds. 6 rows.
sql> SELECT trip_distance, fare_amount FROM quickstart.public.taxi_trips LIMIT 10;
+---------------+-------------+
| trip_distance | fare_amount |
+---------------+-------------+
| 2.4 | 12.1 |
| 0.9 | 7.2 |
| 2.02 | 11.4 |
| 2.08 | 14.2 |
| 1.03 | 8.6 |
| 0.71 | 5.8 |
| 1.0 | 6.5 |
| 2.8 | 17.7 |
| 0.5 | 5.8 |
| 5.7 | 24.7 |
+---------------+-------------+
Time: 0.267290292 seconds. 10 rows.
```
--------------------------------
### Initialize Spice App and Add Quickstart Spicepod
Source: https://github.com/spiceai/cookbook/blob/trunk/acceleration/data-refresh/README.md
This snippet demonstrates how to set up the Spice.ai environment. It creates a new directory, navigates into it, adds the `spiceai/quickstart` Spicepod, and starts the Spice runtime. This prepares the environment for data acceleration and querying.
```bash
mkdir spice-data-refresh
cd spice-data-refresh
# Add the spiceai/quickstart Spicepod
spice add spiceai/quickstart
# Start the Spice runtime
spice run
```
--------------------------------
### Start Spice.ai SQL REPL
Source: https://github.com/spiceai/cookbook/blob/trunk/duckdb/accelerator/README.md
Launches the Spice.ai SQL Read-Eval-Print Loop (REPL), providing an interactive command-line interface to query datasets registered with the Spice.ai runtime.
```bash
spice sql
```
--------------------------------
### Start Spice AI Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/openai_sdk/README.md
Instructions to clone the Spice AI cookbook repository, navigate to the OpenAI SDK example directory, configure your OpenAI API key in a local environment file, and start the Spice AI runtime. This prepares Spice to act as a proxy for OpenAI API calls.
```bash
git clone https://github.com/spiceai/cookbook
cd cookbook/openai_sdk
echo "SPICE_OPENAI_API_KEY=your_openai_api_key" > .env.local
spice run
```
--------------------------------
### Confirm Spice.ai Dataset Loading Output
Source: https://github.com/spiceai/cookbook/blob/trunk/duckdb/accelerator/README.md
Example terminal output confirming that the Spice.ai runtime has successfully started and registered the `taxi_trips` dataset from S3, indicating it's ready for use.
```bash
Spice.ai runtime starting...
2024-09-16T21:25:43.305988Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 127.0.0.1:9090
2024-09-16T21:25:43.306009Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051
2024-09-16T21:25:43.309474Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090
2024-09-16T21:25:43.311587Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
2024-09-16T21:25:43.507974Z INFO runtime: Initialized results cache; max size: 128.00 MiB, item ttl: 1s
2024-09-16T21:25:44.101055Z INFO runtime: Dataset taxi_trips registered (s3://spiceai-demo-datasets/taxi_trips/2024/), results cache enabled.
```
--------------------------------
### Clone and Navigate to Project Directory
Source: https://github.com/spiceai/cookbook/blob/trunk/cdc-debezium/sasl-scram/README.md
Initial setup steps to clone the Spice.ai cookbook repository and navigate into the specific `cdc-debezium/sasl-scram` directory. This prepares the environment for running the example.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/cdc-debezium/sasl-scram
```
--------------------------------
### Start the Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/arrow/README.md
Starts the Spice.ai runtime, which loads and manages the configured datasets. The console output confirms the runtime is active and the `taxi_trips` dataset has been successfully registered.
```bash
spice run
```
```console
2024/10/22 12:27:07 INFO Checking for latest Spice runtime release...
2024/10/22 12:27:07 INFO Spice.ai runtime starting...
2024-10-22T19:27:08.372600Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051
2024-10-22T19:27:08.372667Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 127.0.0.1:9090
2024-10-22T19:27:08.372790Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090
2024-10-22T19:27:08.373723Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
2024-10-22T19:27:08.572674Z INFO runtime: Initialized results cache; max size: 128.00 MiB, item ttl: 1s
2024-10-22T19:27:08.582201Z INFO runtime: Tool [document_similarity] ready to use
2024-10-22T19:27:08.582226Z INFO runtime: Tool [table_schema] ready to use
2024-10-22T19:27:08.582231Z INFO runtime: Tool [sql] ready to use
2024-10-22T19:27:08.582236Z INFO runtime: Tool [list_datasets] ready to use
2024-10-22T19:27:08.582242Z INFO runtime: Tool [random_sample] ready to use
2024-10-22T19:27:08.582245Z INFO runtime: Tool [sample_distinct_columns] ready to use
2024-10-22T19:27:08.582251Z INFO runtime: Tool [top_n_sample] ready to use
2024-10-22T19:27:09.991363Z INFO runtime: Dataset taxi_trips registered (s3://spiceai-demo-datasets/taxi_trips/2024/), results cache enabled.
```
--------------------------------
### Start Spice SQL REPL and Query Dataset (Pre-Acceleration)
Source: https://github.com/spiceai/cookbook/blob/trunk/arrow/README.md
Launches the Spice SQL REPL to interact with the loaded datasets. Executes a sample SQL query against the `taxi_trips` dataset to demonstrate initial query performance before acceleration is enabled.
```bash
spice sql
```
```sql
select "VendorID", tpep_pickup_datetime, tpep_dropoff_datetime, passenger_count from taxi_trips limit 10;
```
```console
+----------+----------------------+-----------------------+-----------------+
| VendorID | tpep_pickup_datetime | tpep_dropoff_datetime | passenger_count |
+----------+----------------------+-----------------------+-----------------+
| 2 | 2024-01-29T19:28:41 | 2024-01-29T19:36:46 | 2 |
| 1 | 2024-01-29T19:22:21 | 2024-01-29T19:28:45 | 2 |
| 1 | 2024-01-29T19:50:24 | 2024-01-29T20:09:21 | 2 |
| 1 | 2024-01-29T19:43:52 | 2024-01-29T20:01:40 | 2 |
| 1 | 2024-01-29T19:09:57 | 2024-01-29T19:55:36 | 2 |
| 1 | 2024-01-29T19:51:28 | 2024-01-29T20:09:16 | 2 |
| 1 | 2024-01-29T19:23:46 | 2024-01-29T19:31:06 | 2 |
| 2 | 2024-01-29T19:01:27 | 2024-01-29T19:09:07 | 2 |
| 1 | 2024-01-29T19:13:53 | 2024-01-29T19:23:09 | 2 |
| 1 | 2024-01-29T19:53:55 | 2024-01-29T20:06:56 | 2 |
+----------+----------------------+-----------------------+-----------------+
Time: 4.291336125 seconds. 10 rows.
```
--------------------------------
### Spice Runtime Startup Log Example
Source: https://github.com/spiceai/cookbook/blob/trunk/acceleration/indexes/README.md
An example of the console output observed during the Spice AI runtime startup. It shows the successful initialization of various services (Flight, HTTP, Metrics, OpenTelemetry), cache setup, and the loading progress of both indexed and non-indexed datasets.
```console
2024-09-30T18:04:26.070605Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051
2024-09-30T18:04:26.070827Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090
2024-09-30T18:04:26.070596Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 127.0.0.1:9090
2024-09-30T18:04:26.078670Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
2024-09-30T18:04:26.270747Z INFO runtime: Initialized results cache; max size: 128.00 MiB, item ttl: 1s
2024-09-30T18:04:26.286500Z INFO runtime: Dataset traces registered (file:large_eth_traces.parquet), acceleration (duckdb:file), results cache enabled.
2024-09-30T18:04:26.287326Z INFO runtime: Dataset traces_no_index registered (file:large_eth_traces.parquet), acceleration (duckdb:file), results cache enabled.
2024-09-30T18:04:26.287668Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset traces
2024-09-30T18:04:26.288332Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset traces_no_index
2024-09-30T18:05:00.532792Z INFO runtime::accelerated_table::refresh_task: Loaded 7,595,994 rows (7.04 GiB) for dataset traces in 34s 245ms.
2024-09-30T18:05:00.683737Z INFO runtime::accelerated_table::refresh_task: Loaded 7,595,994 rows (7.04 GiB) for dataset traces_no_index in 34s 395ms.
```
--------------------------------
### Start the Spice.ai runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/tpc-h/README.md
After initializing the project, navigate into the 'tpch-recipe' directory. The 'spice run' command then starts the Spice.ai runtime, which is essential for processing and serving data from your project.
```bash
cd tpch-recipe
spice run
```
--------------------------------
### Initialize Gradle Wrapper
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spice-java-sdk-sample/README.md
Generates the Gradle wrapper scripts (`gradlew` and `gradlew.bat`) for the project. This command ensures that anyone can build the project with a consistent Gradle version without needing to install Gradle globally. The output confirms the successful generation of the wrapper.
```Shell
gradle wrapper
```
```Shell
Welcome to Gradle 8.9!
Here are the highlights of this release:
- Enhanced Error and Warning Messages
- IDE Integration Improvements
- Daemon JVM Information
For more details see https://docs.gradle.org/8.9/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
```
--------------------------------
### Start the Spice.ai runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/spiceai/README.md
This command starts the local Spice runtime. Once running, it loads the configured catalogs and makes the specified datasets available for querying via SQL.
```bash
spice run
```
--------------------------------
### Initialize Spice.ai Application
Source: https://github.com/spiceai/cookbook/blob/trunk/duckdb/accelerator/README.md
Initializes a new Spice.ai application with a specified project name and navigates into the newly created project directory.
```bash
spice init duckdb-acceleration-qs
cd duckdb-acceleration-qs
```
--------------------------------
### SQL Query Output (Before Acceleration)
Source: https://github.com/spiceai/cookbook/blob/trunk/duckdb/accelerator/README.md
Example output from a SQL query against the `taxi_trips` dataset, showing the retrieved data and the relatively long query execution time before DuckDB acceleration is enabled.
```text
+----------+----------------------+-----------------------+-----------------+
| VendorID | tpep_pickup_datetime | tpep_dropoff_datetime | passenger_count |
+----------+----------------------+-----------------------+-----------------+
| 2 | 2024-01-13T03:18:09 | 2024-01-13T03:24:37 | 1 |
| 2 | 2024-01-13T03:52:58 | 2024-01-13T04:01:18 | 1 |
| 2 | 2024-01-13T03:26:02 | 2024-01-13T03:34:43 | 1 |
| 2 | 2024-01-13T03:53:44 | 2024-01-13T04:10:56 | 1 |
| 2 | 2024-01-13T02:58:28 | 2024-01-13T03:14:33 | 1 |
| 2 | 2024-01-13T03:54:24 | 2024-01-13T04:03:58 | 1 |
| 2 | 2024-01-13T03:06:55 | 2024-01-13T03:50:08 | 3 |
| 2 | 2024-01-13T03:22:26 | 2024-01-13T03:30:50 | 2 |
| 2 | 2024-01-13T03:21:19 | 2024-01-13T03:46:54 | 1 |
| 1 | 2024-01-13T03:13:35 | 2024-01-13T03:40:25 | 1 |
+----------+----------------------+-----------------------+-----------------+
Time: 4.684086261 seconds. 10 rows.
```
--------------------------------
### Initialize a New Spice.ai Application
Source: https://github.com/spiceai/cookbook/blob/trunk/arrow/README.md
Initializes a new Spice.ai application with a specified name and navigates into its directory. This sets up the basic project structure for a Spice.ai project.
```bash
spice init arrow-acceleration-qs
cd arrow-acceleration-qs
```
--------------------------------
### Example Output of NSQL Task History Query
Source: https://github.com/spiceai/cookbook/blob/trunk/text-to-sql/README.md
Displays a sample tabular output from the `runtime.task_history` query, showing details like `start_time`, `task` (e.g., `nsql`, `ai_completion`, `sql_query`), `input`, and `execution_duration_ms` for a specific NSQL operation.
```shell
+----------------------------+------------------+------------------+---------------+-----------------------------------------------------------------+-----------------------+
| start_time | parent_span_id | span_id | task | input | execution_duration_ms |
+----------------------------+------------------+------------------+---------------+-----------------------------------------------------------------+-----------------------+
| 2024-10-14T10:28:46.300138 | | 3ca45f3db11636c8 | nsql | What’s the highest tip any passenger gave? | 9138.792000000001 |
| 2024-10-14T10:28:46.300380 | 3ca45f3db11636c8 | 528cbddc53d55c70 | ai_completion | {"messages":[{"role":"system","content":"```SQL\nCREATE TABLE I | 9133.243999999999 |
| 2024-10-14T10:28:55.433665 | 3ca45f3db11636c8 | 2b25cd3f59aa6362 | sql_query | SELECT MAX(tip_amount) AS highest_tip_amount | 5.012 |
| | | | | FROM taxi_trips | |
+----------------------------+------------------+------------------+---------------+-----------------------------------------------------------------+-----------------------+
```
--------------------------------
### Start Spice Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spice.js-sdk-sample/README.md
Initiates the Spice runtime environment, making it ready to serve data. This command is a prerequisite for connecting with the Spice.js SDK.
```shell
spice run
```
--------------------------------
### Initialize and Start Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/s3/README.md
This snippet demonstrates how to initialize a new Spice.ai project and then start the Spice.ai runtime. It shows the `spice init` command to create the project structure and `spice run` to launch the runtime, along with the expected console output indicating successful startup and service listening ports.
```bash
spice init s3-demo-project
```
```bash
cd s3-demo-project
spice run
```
```bash
2024/11/27 15:00:11 INFO Checking for latest Spice runtime release...
2024/11/27 15:00:11 INFO Spice.ai runtime starting...
2024-11-27T23:00:11.849307Z INFO runtime::init::dataset: No datasets were configured. If this is unexpected, check the Spicepod configuration.
2024-11-27T23:00:11.850273Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 127.0.0.1:9090
2024-11-27T23:00:11.850338Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051
2024-11-27T23:00:11.850888Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090
2024-11-27T23:00:11.858487Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
2024-11-27T23:00:12.052740Z INFO runtime::init::results_cache: Initialized results cache; max size: 128.00 MiB, item ttl: 1s
```
--------------------------------
### Start Spice AI Components
Source: https://github.com/spiceai/cookbook/blob/trunk/llm-judge/README.md
Initialize the Spice AI runtime, starting all necessary components. This command is the foundational step before performing any operations or evaluations with Spice AI.
```bash
spice run
```
--------------------------------
### SQL Query Output (After Acceleration)
Source: https://github.com/spiceai/cookbook/blob/trunk/duckdb/accelerator/README.md
Example output from a SQL query against the `taxi_trips` dataset, showing the retrieved data and the expected fast query execution time after DuckDB acceleration has been successfully applied.
```text
+----------+----------------------+-----------------------+-----------------+
| VendorID | tpep_pickup_datetime | tpep_dropoff_datetime | passenger_count |
+----------+----------------------+-----------------------+-----------------+
| 2 | 2024-01-13T03:18:09 | 2024-01-13T03:24:37 | 1 |
| 2 | 2024-01-13T03:52:58 | 2024-01-13T04:01:18 | 1 |
| 2 | 2024-01-13T03:26:02 | 2024-01-13T03:34:43 | 1 |
| 2 | 2024-01-13T03:53:44 | 2024-01-13T04:10:56 | 1 |
```
--------------------------------
### Start the Spice AI Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/odbc/README.md
This command starts the Spice AI Runtime, which loads the configured datasets from the 'spicepod.yml' file and makes them available for querying.
```bash
spice run
```
--------------------------------
### Start the Spice runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/unity_catalog/README.md
This command initiates the Spice runtime, making the configured data sources and connectors, including the Unity Catalog, available for querying.
```bash
spice run
```
--------------------------------
### Run Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/github/README.md
Navigates to the project directory and starts the Spice.ai runtime, which initializes data connectors and makes datasets available for querying.
```bash
cd cookbook/github
spice run
```
--------------------------------
### Start Spice.ai and Superset with Docker Compose
Source: https://github.com/spiceai/cookbook/blob/trunk/sales-bi/README.md
Command to execute the `make` target, which orchestrates the startup of the Spice runtime and Apache Superset using Docker Compose. This command initiates the services defined in the `sales-bi` directory's Docker Compose configuration.
```bash
make
```
--------------------------------
### Start Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/models/xai/README.md
Starts the Spice.ai runtime from the recipe directory. This command initializes the environment, making the configured xAI Grok models available for interaction.
```shell
spice run
```
--------------------------------
### Start Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/models/filesystem/README.md
Command to initiate the Spice.ai runtime, which will load the configured local model and start various services like metrics, Flight, HTTP, and OpenTelemetry. This step makes the model ready for inferencing.
```shell
spice run
```
--------------------------------
### Start Docker Compose Stack for Retention Demo
Source: https://github.com/spiceai/cookbook/blob/trunk/retention/README.md
Command to start the Docker Compose services defined in the project's Makefile, initiating the data retention demo environment.
```bash
make
```
--------------------------------
### Configure Quickstart Catalog in spicepod.yaml
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/spiceai/README.md
This YAML configuration snippet illustrates how to extend your `spicepod.yaml` file to include the 'quickstart' catalog. By referencing `spice.ai/spiceai/quickstart`, you gain access to pre-defined datasets like `taxi_trips` within your Spice.ai project, facilitating data integration from multiple sources.
```yaml
catalogs:
# ... existing catalog ...
- from: spice.ai/spiceai/quickstart
name: quickstart
```
--------------------------------
### Example Spice AI Chat Interaction
Source: https://github.com/spiceai/cookbook/blob/trunk/nvidia-nim/kubernetes/README.md
Demonstrates an example interaction within the Spice AI chat interface, showing how to prompt the connected NIM LLM (e.g., `meta/llama3-8b-instruct`) with a query.
```bash
Using model: nim
chat> Tell me a joke about the moon.
```
--------------------------------
### Start Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/file/README.md
Initiates the Spice.ai runtime, which loads the datasets defined in the `spicepod.yaml` file, making them available for querying.
```shell
spice run
```
--------------------------------
### Start Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/spiceai/README.md
Starts the local Spice.ai runtime, which is necessary for processing and querying datasets.
```bash
spice run
```
--------------------------------
### Run Spice SDK Java Application with Gradle
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spice-java-sdk-sample/README.md
Executes the Spice SDK Java application using the Gradle `run` task. This command starts the main application class, demonstrating data retrieval from Spice. The output displays the application's log messages and the retrieved data.
```Shell
./gradlew run
```
```Shell
> Task :run
[main] INFO org.apache.arrow.memory.BaseAllocator - Debug mode disabled. Enable with the VM option -Darrow.memory.debug.allocator=true.
[main] INFO org.apache.arrow.memory.DefaultAllocationManagerOption - allocation manager type not specified, using netty as the default type
[main] INFO org.apache.arrow.memory.CheckAllocator - Using DefaultAllocationManager at memory-netty/16.1.0/c608dab8b8e59d4dc1609a645340f83fa4a145ed/arrow-memory-netty-16.1.0.jar!/org/apache/arrow/memory/netty/DefaultAllocationManagerFactory.class
VendorID tpep_pickup_datetime fare_amount
2 2024-01-02T14:54:44 56.9
1 2024-01-02T14:58:35 25.5
1 2024-01-02T14:21:32 12.1
1 2024-01-02T14:36:26 10.0
2 2024-01-02T14:25:25 38.0
2 2024-01-02T14:41:57 44.3
2 2024-01-02T14:47:52 66.0
2 2024-01-02T14:01:17 21.9
2 2024-01-02T14:27:29 44.3
2 2024-01-02T14:54:39 8.6
```
--------------------------------
### Initialize and Start Spice Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/views/README.md
Run these commands to initialize a new Spice project specifically for accelerated views, navigate into the newly created project directory, and then start the Spice runtime. This prepares the local environment for defining and utilizing accelerated views.
```bash
spice init accelerated-views
cd accelerated-views
spice run
```
--------------------------------
### Install Scala and sbt Dependencies
Source: https://github.com/spiceai/cookbook/blob/trunk/clients/scala/README.md
Installs Scala and sbt (Scala Build Tool) using Homebrew, which are required to compile and run the Scala JDBC client.
```bash
brew install scala
brew install sbt
```
--------------------------------
### Start Spice.ai Runtime for GitHub File Search
Source: https://github.com/spiceai/cookbook/blob/trunk/search_github_files/README.md
Instructions to clone the Spice.ai cookbook repository, navigate to the `search_github_files` directory, and start the Spice runtime. This step is a prerequisite for performing searches on GitHub files.
```shell
git clone https://github.com/spiceai/cookbook
cd cookbook/search_github_files
spice run
```
--------------------------------
### Set Up Python Client Environment
Source: https://github.com/spiceai/cookbook/blob/trunk/openai_sdk/README.md
Steps to create and activate a Python virtual environment and install necessary packages for the client application. This ensures project isolation and manages dependencies.
```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
```bash
uv venv
source .venv/bin/activate
uv sync
```
--------------------------------
### Initialize Spicepod in a new directory
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/unity_catalog/README.md
This command sequence creates a new directory named `uc-catalog-demo`, navigates into it, and initializes a new Spicepod project, setting up the basic structure for a Spice application.
```bash
mkdir uc-catalog-demo
cd uc-catalog-demo
spice init
```
--------------------------------
### Start Spice.ai Runtime for Markdown
Source: https://github.com/spiceai/cookbook/blob/trunk/file/README.md
Initiates the Spice.ai runtime to load the Markdown datasets defined in the `spicepod.yaml` file, making them available for querying.
```shell
spice run
```
--------------------------------
### Start the Spice Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/glue/README.md
This command starts the Spice runtime, which will register the configured AWS Glue catalog and discover tables based on your `spicepod.yaml` configuration. Successful execution will display logs indicating the catalog's registration and the number of schemas and tables discovered.
```bash
spice run
```
--------------------------------
### Initialize a new Spicepod project
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/spiceai/README.md
This command initializes a new Spicepod project named `spice-catalog-demo` and then navigates into the newly created directory, setting up the basic project structure for a Spice.ai application.
```bash
spice init spice-catalog-demo
cd spice-catalog-demo
```
--------------------------------
### Clone Spice Rust SDK Sample Application
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spice-rs-sdk-sample/README.md
Clones the `spiceai/cookbook` repository from GitHub and navigates into the specific `client-sdk/spice-rs-sdk-sample` directory. This prepares the environment for building and running the Rust SDK example.
```shell
git clone https://github.com/spiceai/cookbook.git
cd cookbook/client-sdk/spice-rs-sdk-sample
```
--------------------------------
### Install Python Dependencies for ADBC Client
Source: https://github.com/spiceai/cookbook/blob/trunk/clients/adbc/README.md
Creates a Python virtual environment, activates it, and installs the required packages listed in `requirements.txt` using pip, ensuring all necessary libraries are available for the ADBC client script.
```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
--------------------------------
### Start local Iceberg catalog using Docker Compose
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/iceberg/README.md
These commands clone the Spice.ai cookbook repository, navigate to the Iceberg catalog example, and then start the Iceberg catalog and its dependencies (like MinIO for S3 storage) as Docker containers in detached mode. This provides a local Iceberg environment for Spice.ai to connect to.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/catalogs/iceberg
docker compose up -d
```
--------------------------------
### Start Docker Compose Stack for Constraint Demo
Source: https://github.com/spiceai/cookbook/blob/trunk/acceleration/constraints/README.md
Command to initialize and start the Docker Compose stack defined for this recipe. This stack includes a local Postgres database, the Spice.ai runtime, and a worker service that simulates data updates, enabling the demonstration of constraint enforcement.
```bash
make
```
--------------------------------
### Clone SpiceAI Cookbook Repository
Source: https://github.com/spiceai/cookbook/blob/trunk/clients/java/README.md
Clones the SpiceAI cookbook repository from GitHub and navigates into the specific Java client directory to prepare for project setup.
```bash
git clone https://github.com/spiceai/cookbook.git
cd clients/java
```
--------------------------------
### Clone SpiceAI Cookbook Repository
Source: https://github.com/spiceai/cookbook/blob/trunk/clients/adbc/README.md
Clones the `spiceai/cookbook` GitHub repository and navigates into the `clients/adbc` directory, preparing the environment for the ADBC client example.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/clients/adbc
```
--------------------------------
### Configure SQL Analyst LLM System Prompt with Examples
Source: https://github.com/spiceai/cookbook/blob/trunk/llm-judge/README.md
This YAML snippet demonstrates how to modify the `sql-analyst` LLM's `system_prompt` to guide its SQL generation. By including explicit 'Good' and 'Bad' examples, the model learns to return only valid SQL queries, improving its adherence to the desired output format.
```yaml
system_prompt: |
You are a data analyst specialising in SQL. Return a SQL query that would answer the user provided question.
Return only valid SQL.
Good:
How many heads of the departments are older than 56?
SELECT count(*) FROM head WHERE age > 56
Bad:
How many heads of the departments are older than 56?
To find the part oldest head of department, you can use the following SQL query:\n\n```sql\nSELECT p_brand FROM spice.public.part WHERE p_partkey = 3;\n```SELECT count(*) FROM head WHERE age > 56```
How many heads of the departments are older than 56?
```sql\nSELECT count(*) FROM head WHERE age > 56\n```
```
--------------------------------
### Start Spice.ai Runtime and Observe Logs
Source: https://github.com/spiceai/cookbook/blob/trunk/postgres/accelerator/README.md
This snippet initiates the Spice.ai runtime, which is responsible for data acceleration and serving. The console output shows the various services (Metrics, Flight, OpenTelemetry, HTTP) starting up and listening on their respective ports.
```bash
spice run
```
```console
Spice.ai runtime starting...
2024-05-07T01:01:40.566270Z INFO spiced: Metrics listening on 127.0.0.1:9090
2024-05-07T01:01:40.566873Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051
2024-05-07T01:01:40.566960Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
2024-05-07T01:01:40.568738Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090
```
--------------------------------
### Clone Spice.ai Cookbook Repository
Source: https://github.com/spiceai/cookbook/blob/trunk/sales-bi/README.md
Instructions to clone the `spiceai/cookbook` GitHub repository and navigate into the `sales-bi` directory. This directory contains the necessary Docker Compose files and configurations for setting up the Spice runtime and Apache Superset.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/sales-bi
```
--------------------------------
### Start Local FTP Server with Docker Compose
Source: https://github.com/spiceai/cookbook/blob/trunk/ftp/README.md
This snippet clones the Spice.ai cookbook repository and starts a local FTP server preloaded with demo CSV data using Docker Compose. This is a prerequisite for connecting Spice.ai to FTP data.
```bash
git clone https://github.com/spiceai/cookbook # Skip if already cloned
cd cookbook/ftp
make # Start the FTP server
```
--------------------------------
### Start the Spice AI Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/sqlite/accelerator/README.md
Executes the `spice run` command to initialize the Spice AI runtime. This command starts the core services, including metrics, Flight, HTTP, and OpenTelemetry, and registers datasets like `taxi_trips` for processing.
```bash
spice run
```
--------------------------------
### Start Spice.ai SQL REPL
Source: https://github.com/spiceai/cookbook/blob/trunk/spiceai/README.md
Launches the Spice.ai SQL Read-Eval-Print Loop (REPL), allowing users to execute SQL queries directly against connected datasets.
```bash
spice sql
```
--------------------------------
### Example Logs: New User Insertions
Source: https://github.com/spiceai/cookbook/blob/trunk/retention/README.md
Sample output from the `spiceai-retention-demo-worker` showing simulated new user data being inserted into the system.
```console
Inserted new user user_1743059111919094138@example.com with username user_1743059111919131971
Inserted new user user_1743059116946543113@example.com with username user_1743059116946571113
Inserted new user user_1743059121968650335@example.com with username user_1743059121968694585
Inserted new user user_1743059126987340233@example.com with username user_1743059126987350733
Inserted new user user_1743059131996107498@example.com with username user_1743059131996143414
Inserted new user user_1743059137019737701@example.com with username user_1743059137019748826
Inserted new user user_1743059142033727592@example.com with username user_1743059142033752467
Inserted new user user_1743059147049323917@example.com with username user_1743059147049330500
Inserted new user user_1743059152063665845@example.com with username user_1743059152063694678
```
--------------------------------
### Start the Spice SQL REPL
Source: https://github.com/spiceai/cookbook/blob/trunk/dremio/README.md
Launches the Spice SQL Read-Eval-Print Loop, providing an interactive environment to execute SQL queries directly against configured datasets.
```bash
spice sql
```
--------------------------------
### Initialize Spice.ai Project
Source: https://github.com/spiceai/cookbook/blob/trunk/spiceai/README.md
Initializes a new Spice.ai project directory and navigates into it, setting up the basic structure for a Spice application.
```bash
spice init spiceai-demo
cd spiceai-demo
```
--------------------------------
### Start Insecure PostgreSQL Docker Container
Source: https://github.com/spiceai/cookbook/blob/trunk/postgres/accelerator/README.md
Launch a PostgreSQL server instance using Docker. This setup employs 'trust' authentication, making it insecure and suitable only for local development and testing purposes.
```bash
docker run --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d -p 5432:5432 postgres
```
--------------------------------
### Install Python Dependencies for Spicepy SDK
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spicepy-sdk-sample/README.md
Sets up a Python virtual environment and installs the `spicepy` SDK directly from its GitHub repository. This ensures all required Python packages are properly isolated and available for the sample application to interact with the Spice runtime.
```shell
python -m venv .venv
source .venv/bin/activate
pip install git+https://github.com/spiceai/spicepy@v3.0.0
```
--------------------------------
### Start Spice Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/evals/README.md
Initiates the Spice runtime environment, making its services available for subsequent operations like running evaluations. This command is a prerequisite for interacting with Spice.
```shell
spice run
```
--------------------------------
### Clone Spice Cookbook Repository
Source: https://github.com/spiceai/cookbook/blob/trunk/clients/scala/README.md
Clones the `spiceai/cookbook` GitHub repository to your local machine and navigates into the `clients/scala` directory, which contains the example Scala client code.
```bash
git clone https://github.com/spiceai/cookbook.git
cd clients/scala
```
--------------------------------
### Start Spice AI Runtime for Web Search Tool
Source: https://github.com/spiceai/cookbook/blob/trunk/websearch/README.md
Initializes the Spice AI runtime, which is required before making direct calls to the 'the_internet' web search tool.
```shell
spice run
```
--------------------------------
### Download Phi-3-mini-4k-instruct Model Files
Source: https://github.com/spiceai/cookbook/blob/trunk/models/filesystem/README.md
Shell command to create a directory and download all necessary files for the Phi-3-mini-4k-instruct model from Hugging Face, including configuration, generation, model safetensors, and tokenizer files. This process can take several minutes due to the model's size.
```shell
mkdir -p phi-3-mini && BASE_URL="https://huggingface.co/microsoft/Phi-3-mini-4k-instruct/resolve/main" \
&& wget -q --show-progress -P phi-3-mini \
"$BASE_URL/config.json" \
"$BASE_URL/generation_config.json" \
"$BASE_URL/model-00001-of-00002.safetensors" \
"$BASE_URL/model-00002-of-00002.safetensors" \
"$BASE_URL/tokenizer.json" \
"$BASE_URL/tokenizer.model" \
"$BASE_URL/tokenizer_config.json"
```
--------------------------------
### Start First Spice Instance
Source: https://github.com/spiceai/cookbook/blob/trunk/mcp/README.md
Initiates the first Spice instance, which will act as an MCP server, making its tools available to other Spice instances.
```bash
spice run
```
--------------------------------
### Clean Up Docker Resources
Source: https://github.com/spiceai/cookbook/blob/trunk/sales-bi/README.md
This command stops and removes all Docker containers and volumes that were created as part of the project setup. It's used to clean up the environment after use.
```bash
make clean
```
--------------------------------
### Example NSQL Query Response with Generated SQL
Source: https://github.com/spiceai/cookbook/blob/trunk/text-to-sql/README.md
Illustrates the JSON response format when the `/v1/nsql` endpoint is queried with the `Accept: application/vnd.spiceai.sql.v1+json` header. The response includes `row_count`, `schema`, `data`, and the `sql` query used.
```json
{
"row_count": 1,
"schema": {
"fields": [
{
"name": "highest_tip",
"data_type": "Float64",
"nullable": true,
"dict_id": 0,
"dict_is_ordered": false,
"metadata": {}
}
],
"metadata": {}
},
"data": [
{
"highest_tip": 428.0
}
],
"sql": "SELECT MAX(\"tip_amount\") AS \"highest_tip\"\nFROM \"spice\".\"public\".\"taxi_trips\""
}
```
--------------------------------
### Initialize Spice.ai Project
Source: https://github.com/spiceai/cookbook/blob/trunk/guides/security-analyzer/README.md
This command initializes a new Spice.ai project named 'query-pattern-analyzer' and navigates into its directory, setting up the basic project structure for the security copilot.
```bash
spice init query-pattern-analyzer
cd query-pattern-analyzer
```
--------------------------------
### Start the Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/mcp/README.md
Command to initiate the Spice.ai runtime, which is required to run and connect to Model Context Protocol (MCP) servers and utilize Spice's features.
```bash
spice run
```
--------------------------------
### Start Spice OSS Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/clients/scala/README.md
Initiates the local Spice OSS runtime using the Spice CLI. This runtime serves as the data source for the Scala JDBC client.
```bash
spice run
```
--------------------------------
### Observe Spice Runtime Cache Initialization (Console Output)
Source: https://github.com/spiceai/cookbook/blob/trunk/caching/README.md
Example console output from the Spice Runtime showing the successful initialization of the results cache and registration of various datasets. This output confirms that the runtime has started and is using the configured cache settings.
```console
2024-08-05T05:25:10.627005Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 127.0.0.1:9090
2024-08-05T05:25:10.628875Z INFO runtime: Initialized results cache; max size: 128.00 MiB, item ttl: 1s
2024-08-05T05:26:50.262092Z INFO runtime: Dataset customer registered (s3://spiceai-demo-datasets/tpch/customer/), results cache enabled.
2024-08-05T05:26:51.569841Z INFO runtime: Dataset lineitem registered (s3://spiceai-demo-datasets/tpch/lineitem/), results cache enabled.
2024-08-05T05:26:52.871013Z INFO runtime: Dataset nation registered (s3://spiceai-demo-datasets/tpch/nation/), results cache enabled.
2024-08-05T05:26:54.201229Z INFO runtime: Dataset orders registered (s3://spiceai-demo-datasets/tpch/orders/), results cache enabled.
2024-08-05T05:26:55.583954Z INFO runtime: Dataset part registered (s3://spiceai-demo-datasets/tpch/part/), results cache enabled.
2024-08-05T05:26:56.933827Z INFO runtime: Dataset partsupp registered (s3://spiceai-demo-datasets/tpch/partsupp/), results cache enabled.
2024-08-05T05:26:58.182547Z INFO runtime: Dataset region registered (s3://spiceai-demo-datasets/tpch/region/), results cache enabled.
2024-08-05T05:26:59.501475Z INFO runtime: Dataset supplier registered (s3://spiceai-demo-datasets/tpch/supplier/), results cache enabled.
```
--------------------------------
### Initialize a new Spice project
Source: https://github.com/spiceai/cookbook/blob/trunk/dremio/README.md
Initializes a new Spice project named 'dremio-demo' and navigates into its directory. This is the foundational step to set up a new Spice application.
```bash
spice init dremio-demo
cd dremio-demo
```
--------------------------------
### Interact with Local Model using Spice.ai Chat CLI
Source: https://github.com/spiceai/cookbook/blob/trunk/models/filesystem/README.md
Demonstrates how to use the `spice chat` CLI command to interact with the locally deployed `local_model`. It includes an example query to the model.
```shell
Using model: local_model
chat> If Alice is older than Bob, and Bob is older than Charlie, who is the youngest? Explain your answer
```
--------------------------------
### Get 10 Most Recent Stargazers of SpiceAI Repository
Source: https://github.com/spiceai/cookbook/blob/trunk/github/README.md
This SQL query retrieves the `starred_at` timestamp and `login` of the 10 most recent stargazers from the `spiceai.stargazers` table. It orders the results by `starred_at` in descending order and limits to 10 entries. The console output shows an example of the returned data.
```sql
select starred_at, login from spiceai.stargazers order by starred_at DESC limit 10;
```
```console
+----------------------+----------------------+
| starred_at | login |
+----------------------+----------------------+
| 2024-09-15T13:22:09Z | cisen |
| 2024-09-14T18:04:22Z | tyan-boot |
| 2024-09-13T10:38:01Z | yofriadi |
| 2024-09-13T10:01:33Z | FourSpaces |
| 2024-09-13T04:02:11Z | d4x1 |
| 2024-09-11T18:10:28Z | stephenakearns-insta |
| 2024-09-09T22:17:42Z | Lrs121 |
| 2024-09-09T19:56:26Z | jonathanfinley |
| 2024-09-09T07:02:10Z | leookun |
| 2024-09-09T03:04:27Z | royswale |
+----------------------+----------------------+
Time: 0.0088075 seconds. 10 rows.
```
--------------------------------
### Clone and Run Spice.ai CQRS Sample Application
Source: https://github.com/spiceai/cookbook/blob/trunk/cqrs/README.md
Provides the necessary `git` and `make` commands to set up and build the Spice.ai CQRS sample application from the cookbook repository. This prepares the environment for running performance benchmarks.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/cqrs
make
```
--------------------------------
### Clone and Navigate Spice.ai Cookbook Repository
Source: https://github.com/spiceai/cookbook/blob/trunk/retention/README.md
Instructions to clone the Spice.ai cookbook repository from GitHub and navigate into the 'retention' directory to prepare for running the demo.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/retention
```
--------------------------------
### Building and Running Spice.ai with Docker Compose
Source: https://github.com/spiceai/cookbook/blob/trunk/docker/README.md
Executes the `docker-compose up --build` command to build the Docker image defined by the Dockerfile and start the containerized Spice.ai runtime along with a MySQL Sakila sample database. This command orchestrates the setup and initialization of both services, displaying the build and runtime logs.
```shell
docker-compose up --build
```
```shell
=> [spiced internal] load build definition from Dockerfile 0.0s
...
✔ Container spiceai-mysql-sakila Created 0.0s
✔ Container spiced-container Created 0.0s
Attaching to spiceai-mysql-sakila, spiced-container
spiceai-mysql-sakila | 2024-12-19 01:36:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.1.0-1.el8 started.
spiceai-mysql-sakila | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
spiceai-mysql-sakila | 2024-12-19T01:36:24.416215Z 0 [System] [MY-015015] [Server] MySQL Server - start.
spiceai-mysql-sakila | 2024-12-19T01:36:24.544874Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.1.0) starting as process 7
spiceai-mysql-sakila | 2024-12-19T01:36:24.547827Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
...
spiced-container | 2024-12-19T01:36:24.772197Z INFO runtime::opentelemetry: Spice Runtime OpenTelemetry listening on 127.0.0.1:50052
spiced-container | 2024-12-19T01:36:24.772246Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 0.0.0.0:9090
spiced-container | 2024-12-19T01:36:24.772267Z INFO runtime::flight: Spice Runtime Flight listening on 0.0.0.0:50051
spiced-container | 2024-12-19T01:36:24.772389Z INFO runtime::http: Spice Runtime HTTP listening on 0.0.0.0:8090
spiced-container | 2024-12-19T01:36:24.888666Z INFO runtime::init::embedding: Embedding [hf_minilm] ready to embed
spiced-container | 2024-12-19T01:36:24.888807Z INFO runtime::init::dataset: Initializing dataset films
spiced-container | 2024-12-19T01:36:24.888926Z INFO runtime::init::model: Loading model [openai] from openai:gpt-4o...
spiced-container | 2024-12-19T01:36:24.889476Z INFO runtime::init::results_cache: Initialized results cache; max size: 128.00 MiB, item ttl: 1s
spiced-container | 2024-12-19T01:36:24.904304Z INFO runtime::init::dataset: Dataset films registered (mysql:film), acceleration (arrow), results cache enabled.
spiced-container | 2024-12-19T01:36:24.905805Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset films
spiced-container | 2024-12-19T01:36:28.185593Z INFO runtime::init::model: Model [openai] deployed, ready for inferencing
```
--------------------------------
### Query Data in Apache Superset SQL Lab
Source: https://github.com/spiceai/cookbook/blob/trunk/sales-bi/README.md
Example SQL queries to explore the `cleaned_sales_data` and `cleaned_sales_data_accelerated` datasets within Apache Superset's SQL Lab. These queries demonstrate how to interact with both accelerated and non-accelerated data sources from the Spice.ai runtime.
```SQL
SELECT * FROM cleaned_sales_data LIMIT 10
SELECT * FROM cleaned_sales_data_accelerated LIMIT 10
```
--------------------------------
### SpiceAI `sample_data` API Definition and Invocation
Source: https://github.com/spiceai/cookbook/blob/trunk/text-to-sql/README.md
Defines the `sample_data` function available in the SpiceAI environment, used for retrieving a limited number of rows from a specified dataset. This function is typically invoked by an automated assistant or tool to inspect data. The `dataset` parameter specifies the target data source, and `limit` controls the number of rows. An example of the JSON tool call structure is also provided.
```APIDOC
Function: sample_data
Description: Retrieves a sample of data from a specified dataset.
Parameters:
dataset (string): The fully qualified name of the dataset (e.g., "spice.public.taxi_trips").
limit (integer): The maximum number of rows to retrieve.
Returns: Tabular data (e.g., ASCII table) representing the sampled rows.
```
```JSON
{
"id": "distinct-spice.public.taxi_trips-nsql",
"type": "function",
"function": {
"name": "sample_data",
"arguments": "{\"dataset\":\"spice.public.taxi_trips\",\"limit\":3}"
}
}
```
--------------------------------
### Start Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/llm-memory/README.md
Command to start the Spice.ai runtime, which initializes datasets, loads models (e.g., `gpt-4o`), and starts various services like Flight, HTTP, and OpenTelemetry. This is a prerequisite for interacting with LLM memory features.
```shell
spice run
```
--------------------------------
### Execute Spicepy Sample Application
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spicepy-sdk-sample/README.md
Runs the `sample.py` Python script, which demonstrates how to connect to the Spice runtime and query data using the `spicepy` SDK. The script outputs a table of queried data, showcasing the SDK's functionality.
```shell
python sample.py
```
--------------------------------
### Initialize a new Spice.ai project for TPC-H
Source: https://github.com/spiceai/cookbook/blob/trunk/tpc-h/README.md
This command initializes a new Spice.ai project named 'tpch-recipe'. This is the first step to set up the TPC-H benchmark data within the Spice.ai environment, creating the necessary project structure.
```bash
spice init tpch-recipe
```
--------------------------------
### Clone Spice.ai Cookbook and Navigate to Sample
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spicepy-sdk-sample/README.md
Clones the Spice.ai cookbook repository from GitHub and navigates into the `client-sdk/spicepy-sdk-sample` directory. This step is a prerequisite to access the sample application files for the recipe.
```shell
git clone https://github.com/spiceai/cookbook # skip if already cloned
cd cookbook/client-sdk/spicepy-sdk-sample
```
--------------------------------
### Start Clickhouse Server
Source: https://github.com/spiceai/cookbook/blob/trunk/clickhouse/README.md
Command to start a Clickhouse server instance locally, which is a prerequisite for connecting Spice.ai to Clickhouse.
```bash
./clickhouse server
```
--------------------------------
### Start the Spice runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/snowflake/README.md
Starts the Spice.ai runtime, which is essential for processing and serving data. This command initiates the core Spice services.
```bash
spice run
```
--------------------------------
### Initialize a New Spicepod Project
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/glue/README.md
This snippet demonstrates the commands to create a new directory for your Spice project, navigate into it, and initialize a new Spicepod using the `spice init` command. This sets up the basic project structure for your data integration.
```bash
mkdir glue-catalog-demo
cd glue-catalog-demo
spice init
```
--------------------------------
### Install Node.js Dependencies for Spice.js SDK
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spice.js-sdk-sample/README.md
Installs all required Node.js packages for the project, including the Spice JavaScript SDK, as defined in `package.json`.
```shell
npm install
```
--------------------------------
### Verify PostgreSQL Client Installation
Source: https://github.com/spiceai/cookbook/blob/trunk/postgres/accelerator/README.md
Run these commands to confirm that the `createdb` and `psql` client utilities for PostgreSQL are installed and available in your system's PATH.
```bash
createdb --help
psql --help
```
--------------------------------
### Start the Spice Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/federation/README.md
Starts the Spice.ai runtime, which makes the configured data sources and datasets available for querying. Ensure this command is executed from the `federation` directory.
```bash
spice run
```
--------------------------------
### Initialize Spice.ai Project
Source: https://github.com/spiceai/cookbook/blob/trunk/refresh-data-window/README.md
Initializes a new Spice.ai project named 'refresh-data-window-recipe' and navigates into its directory, preparing the environment for data integration.
```bash
spice init refresh-data-window-recipe
cd refresh-data-window-recipe
```
--------------------------------
### Initialize a New Spicepod Project
Source: https://github.com/spiceai/cookbook/blob/trunk/llama/README.md
Initializes a new Spice.ai project directory named 'llama-spicepod' and navigates into it, preparing the environment for model configuration and execution.
```sh
spice init llama-spicepod
cd llama-spicepod
```
--------------------------------
### Clone Spice.ai Java SDK Sample
Source: https://github.com/spiceai/cookbook/blob/trunk/client-sdk/spice-java-sdk-sample/README.md
This command sequence clones the Spice.ai cookbook repository from GitHub and then changes the current directory to the specific Java SDK sample project, preparing the local environment for development.
```shell
git clone https://github.com/spiceai/cookbook.git
cd cookbook/client-sdk/spice-java-sdk-sample
```
--------------------------------
### Start Spice.ai Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/s3/README.md
Commands to navigate into the project directory and start the Spice.ai runtime. This initiates the data acceleration engine and makes configured datasets available for querying.
```bash
cd s3-demo-project
spice run
```
--------------------------------
### Initialize a new Spicepod directory
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/iceberg/README.md
This command sequence creates a new directory for the Iceberg catalog recipe, navigates into it, and initializes a new Spicepod configuration, preparing the environment for Spice.ai.
```bash
mkdir iceberg-catalog-recipe
cd iceberg-catalog-recipe
spice init
```
--------------------------------
### Install Spice.ai in Kubernetes using Helm
Source: https://github.com/spiceai/cookbook/blob/trunk/kubernetes/README.md
These commands add the official Spice.ai Helm repository and then install Spice.ai into the Kubernetes cluster. Helm simplifies the deployment and management of applications on Kubernetes.
```bash
helm repo add spiceai https://helm.spiceai.org
helm install spiceai-dev spiceai/spiceai
```
--------------------------------
### Clone and Navigate Spice.ai Cookbook Repository
Source: https://github.com/spiceai/cookbook/blob/trunk/acceleration/constraints/README.md
Instructions to clone the Spice.ai cookbook repository from GitHub and navigate into the specific directory for the acceleration constraints example. This is the first step to set up the project locally.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/acceleration/constraints
```
--------------------------------
### Clone Spice.ai Cookbook and Navigate to DeepSeek Directory
Source: https://github.com/spiceai/cookbook/blob/trunk/deepseek/README.md
Instructions to clone the Spice.ai cookbook repository from GitHub and change into the specific `deepseek` example directory, which is a necessary first step for setting up the DeepSeek model recipe.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/deepseek
```
--------------------------------
### Example Chat Interaction with Grok Model
Source: https://github.com/spiceai/cookbook/blob/trunk/models/xai/README.md
An example of a question posed within the Spice.ai chat interface. This demonstrates how to interact with the underlying xAI Grok model by typing a query and pressing enter.
```text
chat> Who are you and who made you?
```
--------------------------------
### Start the Spice Runtime
Source: https://github.com/spiceai/cookbook/blob/trunk/catalogs/databricks/README.md
This bash command initiates the Spice runtime, which loads the configured Spicepod and makes the Databricks Unity Catalog tables available for querying. This step is performed after all necessary configurations are in place.
```bash
spice run
```
--------------------------------
### Clone Spice.ai Cookbook Repository
Source: https://github.com/spiceai/cookbook/blob/trunk/models/filesystem/README.md
Instructions to clone the Spice.ai cookbook repository from GitHub and navigate to the specific `models/filesystem` directory, which is a prerequisite for this recipe.
```bash
git clone https://github.com/spiceai/cookbook.git
cd cookbook/models/filesystem
```
--------------------------------
### Initialize Spice.ai Application Directory
Source: https://github.com/spiceai/cookbook/blob/trunk/postgres/accelerator/README.md
This snippet initializes a new Spice.ai application named `postgres-demo` and navigates into its directory. This sets up the basic project structure for a Spice.ai application.
```bash
spice init postgres-demo
cd postgres-demo
```