返回目录
开源项目其他开源工具类新手

GitHub - spiceai/spiceai: Add a real-time analytics node to your operational database. Spice is a portable, accelerated SQL query, search, a

📄 Docs | ⚡️ Quickstart | 🧑‍🍳 Cookbook | 🤖 AI Skills | 📰 Blog Spice is a portable, accelerated SQL query, search, and LLM-inference engine, written in Rust, for data-grounded AI apps and agents. Run it as a sidecar next to your application — or scale to a

0 次阅读2026/09/16 发布
GitHub - spiceai/spiceai: Add a real-time analytics node to your operational database. Spice is a portable, accelerated SQL query, search, a 来源图片

社区作者 · zZz

它解决什么问题

📄 Docs | ⚡️ Quickstart | 🧑‍🍳 Cookbook | 🤖 AI Skills | 📰 Blog

Spice is a portable, accelerated SQL query, search, and LLM-inference engine, written in Rust, for data-grounded AI apps and agents.

Run it as a sidecar next to your application — or scale to a multi-node distributed cluster — to get millisecond data and AI on localhost , backed by your existing data sources.

🎯 Goal : Build data-grounded AI apps and agents in minutes, not months. No pipelines. No glue. Just SQL, search, and inference — federated across your data, accelerated locally, served on localhost.

🆕 New in Spice 2.0 — add a real-time analytics node to your operational database.

Point Spice at PostgreSQL, MySQL, or MongoDB and it maintains a sandboxed, analytics-ready replica with high-throughput CDC replication — sub-second queries, ~2-second freshness, and zero analytical load on production . No ETL, no Debezium, no Kafka required.

Read the Spice 2.0 launch →

Why Spice?

  • ⚡ Real-time analytics node for your operational database — Add a sandboxed analytics replica to PostgreSQL, MySQL, and MongoDB via native CDC (WAL, binlog, change streams) plus DynamoDB Streams — ~2-second freshness, zero load on production, no ETL, no Debezium or Kafka required .
  • 🚀 Localhost latency at any scale — Millisecond queries against a sandboxed working set on each pod, transparently delegated to a distributed cluster for the long tail.
  • 🦀 Built in Rust on industry-leading open foundations: Apache DataFusion , Apache Ballista , Apache Arrow , Apache Iceberg , Vortex , DuckDB , and SQLite .
  • ⚡ Distributed query without the operational tax — Apache Ballista with multi-active schedulers coordinated through object storage. 2.9x faster than single-node DataFusion on TPC-H SF100, 8x less RAM than Spark .
  • 💎 Spice Cayenne data accelerator on Vortex (GA) — 1.5x faster than DuckDB with 3x less memory on TPC-H SF100, 26x faster than Spice 1.x on TPC-DS SF100 , 100x faster random access vs. Parquet .
  • 🔍 Petabyte-scale hybrid search — Native Amazon S3 Vectors, Tantivy BM25, DuckDB HNSW, and Elasticsearch kNN, with reciprocal rank fusion (RRF) and reranker UDTFs — all in a single SQL query.
  • 🤖 AI-native runtime — OpenAI-compatible APIs, MCP server + gateway, LLM memory, NSQL text-to-SQL, multi-vector ColBERT-style embeddings, provider-aware prompt caching.
  • 🔗 30+ data connectors with advanced query push-down — federate Postgres, MySQL, Snowflake, Databricks, Iceberg, Delta Lake, S3, Spark, MSSQL, DynamoDB, MongoDB, GitHub, SharePoint, Kafka, and more.
  • 📝 Open table formats, first-class — Query, accelerate, and write to Apache Iceberg with ACID guarantees via standard SQL INSERT INTO . No Spark required.
  • 🛡️ Enterprise-ready — HashiCorp Vault and Azure Key Vault secret stores, mTLS, read-only API keys, observability via OpenTelemetry, and an extensibility model used in production at companies like Twilio and Barracuda.

📣 Latest: Spice 2.0 is now available — real-time analytical query on operational data, without ETL: ~170x faster CDC ingest , 2-second freshness , 1,046 QPH of HTAP analytics at SF1000 under a 266,000+ tpmC live transactional load .

| Read the Cluster-Sidecar Architecture and Apache Ballista deep dives.

What you get

Spice provides five APIs and interfaces in a lightweight, portable runtime (single binary or container):

  • SQL Query & Search : HTTP, Arrow Flight, Arrow Flight SQL, ODBC, JDBC, and ADBC APIs; vector_search , text_search , rrf , and rerank UDTFs.
  • Text-to-SQL (NSQL) : Natural-language SQL generation grounded in your federated schema with built-in sampling tools — usable from the HTTP API, the SQL REPL, or directly inside agent tool calls.
  • OpenAI-Compatible APIs : Hosted LLM gateway (OpenAI, Anthropic, xAI, Bedrock) and local model serving (CUDA/Metal accelerated). Includes the OpenAI Responses API, web search, and tool calls.
  • Iceberg Catalog REST APIs : A unified Iceberg REST Catalog API for query and write.
  • MCP HTTP+SSE APIs : Model Context Protocol server and gateway with Streamable HTTP transport. Dual-era: serves 2026-07-28 ( server/discover , sessionless) and still answers legacy initialize .

🎥 Watch & Learn

  • 🎓 CMU Databases: Accelerating Data and AI with Spice.ai Open-Source — Luke Kim at the Carnegie Mellon Database Group
  • ☁️ AWS re:Invent 2025 (STG364): How Spice AI operationalizes data lakes for AI using Amazon S3
  • 🔍 How to search with Amazon S3 Vectors
  • 💎 Introducing the Spice Cayenne Data Accelerator
  • 🧊 Writing to Apache Iceberg Tables with Spice.ai
  • 🔌 Using Spice as an MCP Server and Gateway
  • 🛠️ How to Query Data using Spice, OpenAI, and MCP

📺 More on the Spice.ai YouTube channel .

What's New

Analytics node for operational databases — real-time CDC, no ETL

Add a sandboxed, analytics-ready replica alongside PostgreSQL, MySQL, and MongoDB in minutes — ~2-second end-to-end freshness, zero analytical load on production, and no ETL .

Spice replicates committed inserts, updates, and deletes directly from the native change log at up to ~170x the ingest throughput of Spice 1.x , so production never runs a single analytical query.

It's incrementally adoptable: start with 1 table and be querying operational data in minutes, then join across replicated sources in a single SQL query.

In the CH-BenCHmark HTAP benchmark, 1 Spice node served 1,046 analytical queries/hour at SF1000 (1,000 warehouses, 300M+ rows) while the source sustained a 266,000+ tpmC live transactional load . Read the Spice 2.0 launch →

  • PostgreSQL (WAL), MySQL (binlog), and MongoDB (change streams) — native replication with auto-managed replication state (slots, binlog positions, resume tokens) and bootstrapped initial snapshots. No Debezium or Kafka required.
  • DynamoDB Streams — two-tier acceleration that fans out from a central Spice layer to thousands of edge sidecars with sub-second propagation. Used in production for global control-plane sync. Read the pattern →
  • Debezium — Kafka consumer ( from: debezium:… ) or push ingest without Kafka ( from: cdc:… + POST /v1/datasets/{name}/cdc , JSON/Avro).

Cluster-Sidecar Architecture: localhost latency, cluster scale

Each application gets a complete data plane on localhost .

A lightweight Spice sidecar runs in the application pod, serves SQL/search/LLM-inference from a scoped working set, and transparently delegates the long tail to a central Spice cluster (Ballista distributed query, Cayenne acceleration, hybrid search indexing) over Arrow Flight.

Three latency tiers: results cache (microseconds) → local working set (single-digit milliseconds) → cluster delegation. The application never holds credentials to Postgres, S3, Snowflake, or Iceberg — only a token to its sidecar.

Read the architecture deep dive →

Apache Ballista distributed query

Spice extends Apache Ballista with multi-active scheduler HA coordinated through object storage (no etcd, ZooKeeper, or Redis required), bidirectional gRPC control streams, mandatory mTLS, multiple shuffle backends (local, in-memory, S3/Azure/GCS), Vortex-encoded shuffle data, and distributed embeddings inside SQL.

TPC-H SF100: 2.9x faster on 3 executors than 1 node. 8x less RAM than Apache Spark with 2–8x better query performance — now generally available. Read the engineering deep dive →

Spice Cayenne — next-gen data acceleration on Vortex

Cayenne pairs the Vortex columnar format with SQLite metadata to deliver multi-file acceleration without DuckDB's single-file ceiling or memory overhead.

Now GA with atomic WAL-staged writes, high-throughput CDC ingestion, MERGE INTO , and SQL-defined partitioning. TPC-H SF100: 1.5x faster than DuckDB with 3x less memory. TPC-DS SF100: 26x faster than Spice 1.x. ClickBench: 14% faster, 3.4x less memory.

Vortex itself is 100x faster on random access , 10–20x faster on full scans , and 5x faster writes than Parquet — compute kernels run directly on encoded data, skipping decompression entirely for many operations. Read the Vortex deep dive →

Apache Iceberg: query, accelerate, and write

Connect to any Iceberg catalog (REST, AWS Glue, Hadoop), query tables with full SQL semantics, selectively accelerate hot datasets for sub-10ms reads (down from 500ms–5s on S3), and write back with ACID guarantees via Iceberg's optimistic concurrency protocol — using standard SQL INSERT INTO .

No Spark required. Read the Iceberg deep dive →

Petabyte-scale hybrid search

Native Amazon S3 Vectors (Day 1 launch partner) for billions of vectors at up to 90% lower cost than traditional vector DBs. Plus DuckDB HNSW and Elasticsearch kNN as .vectors.engine backends.

Spice manages the full lifecycle — ingestion → embedding (AWS Bedrock, HuggingFace, OpenAI, Model2Vec for 500x faster static embeddings, multi-vector ColBERT-style late interaction with MaxSim) → indexing → query.

SQL-integrated via vector_search , text_search , rrf (reciprocal rank fusion), and rerank UDTFs.

SELECT * FROM rerank( rrf( vector_search( ' docs ' , ' how does Spice accelerate Iceberg? ' ), text_search( ' docs ' , ' how does Spice accelerate Iceberg? ' ) ), document => content ) LIMIT 10 ;

Multi-tenancy for AI agents — without per-tenant pipelines

Spin up one Spice runtime per tenant or agent — each with its own sandboxed datasets, accelerators, secrets, and policies. Or share a runtime with config-level tenant isolation. Or do both with a hybrid model.

The lightweight ~140MB runtime makes "one Spicepod per tenant" actually viable — even at thousands of tenants . Read the patterns →

Spice Skills for AI coding agents

Drop-in skills for Claude Code, Cursor, and any agent that supports the open Agent Skills format. Skills auto-activate to set up datasets, connect data sources, configure acceleration, run federated queries, and wire models — without you re-explaining Spice's configuration model.

In Claude Code:

/plugin marketplace add spiceai/skills

github.com/spiceai/skills | Read the announcement →

Acceleration Snapshots

Bootstrap accelerated datasets from S3 in seconds, not minutes . Cold-start ephemeral pods with pre-built Vortex/DuckDB/SQLite files. Recover from federated source outages by serving from the last known good snapshot. Critical for sidecar deployments and serverless environments.

Enterprise hardening (latest)

  • HashiCorp Vault and Azure Key Vault secret stores
  • Read-only API keys enforced on Flight DoGet and async query paths
  • Provider-aware LLM prompt caching for cost reduction
  • mTLS for all internal cluster communication; OpenTelemetry metric export with delta temporality
  • Streamable HTTP MCP transport ( 2026-07-28 + legacy initialize ), MCP gateway, MCP server
  • 30+ data connectors with shared HTTP rate control, dynamic headers, schema decomposition

How is Spice different?

  • Cluster-sidecar architecture — Each application gets its own Spice sidecar serving SQL, search, and LLM inference on localhost , transparently delegating the long tail to a central Spice cluster (Ballista distributed query, Cayenne acceleration, hybrid search indexing) over Arrow Flight. You get three latency tiers in one engine: results cache (microseconds) → local working set (single-digit milliseconds) → cluster delegation (distributed) . No other open-source runtime gives you all three behind one connection. Read the architecture →
  • Structural data sandboxing — Datasets a sidecar doesn't declare in its spicepod.yaml are physically absent from the catalog , not filtered at query time. The application never holds credentials to Postgres, S3, Snowflake, or Iceberg — only a token to its sidecar. A compromised pod gets a loopback scoped to that tenant's working set, not database credentials.
  • Ingest once, serve everywhere — The cluster ingests each source dataset once and produces one authoritative materialization that every sidecar pulls. Source systems see one stable connection pool, not one per pod. Pull-based refresh + acceleration snapshots in S3 mean cold starts in seconds and graceful degradation when the cluster is unreachable.
  • AI-Native Runtime — Data query and AI inference live in one engine, so retrieval, ranking, and generation happen in one query plan, in one process — vector_search , text_search , rrf , rerank , NSQL, and tool calls are all SQL primitives.
  • Dual-engine acceleration — Per-dataset choice of OLAP (Cayenne/Vortex, Arrow, DuckDB) and OLTP (SQLite, PostgreSQL) engines, so you can match workload to engine instead of forcing everything into one shape.
  • Edge to cloud, single binary — Runs on a laptop, as a Kubernetes sidecar, as a microservice, or as a multi-node Ballista cluster across edge, on-prem, and public clouds. Self-hosted OSS, Spice Cloud (managed cluster), and Spice.ai Enterprise (on-prem full stack) all use identical spicepod.yaml manifests — no app changes to migrate.

If you build with DataFusion , DuckDB , Vortex , Iceberg , or Ballista , Spice gives you a flexible, production-ready engine you can just use — instead of stitching them together yourself.

Example Use-Cases

Real-time Analytics on Operational Data (no ETL)

  • Analytics node for PostgreSQL, MySQL, and MongoDB : Point Spice at a live operational database and it maintains a continuously updated, sandboxed analytics replica via native CDC — sub-second queries, ~2-second freshness, and zero analytical queries against production . Start with one table, then join across replicated sources in one SQL query. CDC Docs
  • HTAP at scale : Sustain analytics and transactions on the same data — 1,046 analytical QPH at SF1000 under a 266,000+ tpmC transactional load in CH-BenCHmark, all served from the replica. Spice 2.0 launch →
  • Bring your own BI tools : Query the replica from Power BI, Tableau, Looker, and Apache Superset over Arrow Flight SQL, ODBC, and JDBC — or from Python and the Go, Rust, Java, and JavaScript SDKs.

Data-grounded Agentic AI Applications

  • OpenAI-compatible AI Gateway : Hosted (OpenAI, Anthropic, xAI, Bedrock) or local models (Llama, NVIDIA NIM) with Responses API, streaming tool calls, web search, and provider-aware prompt caching. AI Gateway Recipe
  • Federated Data Access : SQL and NSQL (text-to-SQL) across 30+ sources with advanced push-down, scaling to multi-node Ballista. Federated SQL Query Recipe
  • Search and RAG : Petabyte-scale vector search via Amazon S3 Vectors, BM25 full-text via Tantivy, ColBERT-style multi-vector embeddings with MaxSim, hybrid search with RRF, rerank UDTF. Amazon S3 Vectors Recipe
  • LLM Memory and Observability : Persistent agent memory + deep visibility into data flows, model performance, and traces. LLM Memory Recipe | Observability Docs

Database CDN and Query Mesh

  • Co-located acceleration : Materialize working sets as Cayenne (Vortex), Arrow, SQLite, DuckDB, or Postgres alongside your app for sub-second query. Bootstrap from S3 snapshots. DuckDB Accelerator Recipe
  • Resiliency : Maintain availability with local replicas of critical datasets; recover from source outages from snapshots. Local Dataset Replication Recipe
  • Responsive dashboards : Sub-second BI with configurable refresh and CDC. Sales BI Demo
  • Legacy modernization : One endpoint that federates legacy systems with modern infrastructure. Federation Recipe

Multi-Tenant AI Agents

  • One Spicepod per tenant or per agent — sandboxed datasets, sources, secrets, and policies per agent. The runtime is light enough to make this actually viable. Patterns →

Retrieval-Augmented Generation (RAG)

  • Hybrid search in SQL : Combine vector + BM25 with RRF and rerank, in one query plan, against your own data — accelerated.
  • Semantic Knowledge Layer : Define a semantic context model so agents understand the shape and meaning of your data. Semantic Model Docs
  • Text-to-SQL : Built-in NSQL with sampling tools for grounded SQL generation. Text-to-SQL Recipe

FAQ

  • Is Spice a cache? Not exactly — think of Spice acceleration as an active cache: a materialization or data prefetcher. A cache fetches on miss; Spice prefetches and materializes filtered data on an interval, trigger, or via CDC. Spice also supports results caching .
  • Is Spice a CDN for databases? Yes — a common use-case is shipping a working set of a database, data lake, or data warehouse to where it's most frequently accessed: data-intensive applications and AI context.
  • Can I use Spice without Spice Cloud? Yes, the entire runtime is open-source under Apache 2.0. Spice Cloud is an optional managed cluster.

➡️ Docs FAQ

Watch a 30-sec BI dashboard acceleration demo

BI.dashboard.acceleration.with.Spice.mp4

See more demos on YouTube .

Supported Data Connectors

Name Description Status Protocol/Format

databricks (mode: delta_lake) Databricks Stable S3/Delta Lake

delta_lake Delta Lake Stable Delta Lake

dremio Dremio Stable Arrow Flight

duckdb DuckDB Stable Embedded

file File Stable Parquet, CSV

github GitHub Stable GitHub API

postgres PostgreSQL (with native WAL CDC) Stable

s3 S3 Stable Parquet, CSV

mysql MySQL (with native binlog CDC) Stable

spice.ai Spice.ai Stable Arrow Flight

dynamodb Amazon DynamoDB (with Streams) Stable

graphql GraphQL Release Candidate JSON

cosmosdb Azure Cosmos DB (NoSQL) Release Candidate

命令
git
命令
Git repositories

Release Candidate

snowflake Snowflake Release Candidate Arrow

adbc ADBC Release Candidate Arrow

iceberg Apache Iceberg (read+write) Release Candidate Parquet

databricks (mode: spark_connect) Databricks Beta Spark Connect

ducklake DuckLake Beta Parquet

flightsql FlightSQL Beta Arrow Flight SQL

mssql Microsoft SQL Server Beta Tabular Data Stream (TDS)

odbc ODBC Beta ODBC

spark Spark Beta Spark Connect

sharepoint Microsoft SharePoint Beta Object-store listing

oracle Oracle Alpha Oracle ODPI-C

abfs Azure BlobFS Alpha Parquet, CSV

clickhouse ClickHouse Alpha

debezium Debezium CDC (Kafka consumer) Alpha Kafka + JSON

cdc Debezium push ingest (no Kafka) Alpha JSON + Avro HTTP

elasticsearch Elasticsearch (BM25 + kNN + RRF) Alpha

gcs , gs Google Cloud Storage Alpha Parquet, CSV, JSON

kafka Kafka Alpha Kafka + JSON

ftp , sftp FTP/SFTP Alpha Parquet, CSV

glue AWS Glue Alpha Iceberg, Parquet, CSV

http , https HTTP(s) (dynamic headers, pagination) Alpha Parquet, CSV, JSON

imap IMAP Alpha IMAP Emails

localpod Local dataset replication Alpha

mongodb MongoDB (with change-stream CDC) Alpha

scylladb ScyllaDB Alpha

smb SMB 3.1.1 Alpha SMB

nfs NFS Alpha Parquet, CSV, JSON

Supported Data Accelerators

Name Description Status Engine Modes

cayenne Spice Cayenne (Vortex) Stable file

arrow In-Memory Arrow Records Stable memory

duckdb Embedded DuckDB Stable memory , file

postgres Attached PostgreSQL Release Candidate N/A

sqlite Embedded SQLite Release Candidate memory , file

Supported Model Providers

Name Description Status ML Format(s) LLM Format(s)

openai OpenAI (or compatible) LLM endpoint Release Candidate - OpenAI-compatible HTTP endpoint

file Local filesystem Release Candidate ONNX GGUF, GGML, SafeTensor

huggingface Models hosted on HuggingFace Release Candidate ONNX GGUF, GGML, SafeTensor

spice.ai Models hosted on the Spice.ai Cloud Platform, or served by another Spice runtime

- OpenAI-compatible HTTP endpoint

azure Azure OpenAI

- OpenAI-compatible HTTP endpoint

bedrock Amazon Bedrock (Nova models) Alpha - OpenAI-compatible HTTP endpoint

anthropic Models hosted on Anthropic Alpha - OpenAI-compatible HTTP endpoint

xai Models hosted on xAI Alpha - OpenAI-compatible HTTP endpoint

Supported Embeddings Providers

Name Description Status ML Format(s) LLM Format(s)

openai OpenAI (or compatible) embeddings endpoint Release Candidate - OpenAI-compatible embeddings endpoint

file Local filesystem Release Candidate ONNX GGUF, GGML, SafeTensor

huggingface Models hosted on HuggingFace Release Candidate ONNX GGUF, GGML, SafeTensor

model2vec Static embeddings (500x faster) Release Candidate Model2Vec -

azure Azure OpenAI Alpha - OpenAI-compatible HTTP endpoint

bedrock AWS Bedrock (Titan, Cohere, Nova, Nova 2) Alpha - OpenAI-compatible HTTP endpoint

Supported Vector Engines

Configured as .vectors.engine on a column-level embedding.

Name Description Status

s3_vectors Amazon S3 Vectors for petabyte-scale vector storage and querying Alpha

duckdb DuckDB with HNSW vector index Alpha

elasticsearch Elasticsearch with kNN Alpha

Change Forwarding to Drasi (Alpha)

Alpha — Drasi support is in preview and should not be used in production.

Configured as .drasi on a dataset accelerated with refresh_mode: changes . Publishes the dataset's change-data-capture stream to a Drasi source, so Drasi continuous queries react to the same changes Spice applies to the local accelerator.

One row becomes one graph node: the primary key derives the element id, the source table name becomes the node label, and the row's columns become node properties.

Forwarding runs before the change is acknowledged to the source, so delivery is at-least-once — a change is replayed rather than lost if Drasi is unreachable.

datasets :

name : orders acceleration : enabled : true engine : cayenne refresh_mode : changes drasi : source_id : spice-cdc delivery : queued # or acknowledged (default) params : drasi_http_endpoint : http://localhost:9000

  • from : postgres:public.orders

Transport Description Status

http Batched POST to a Drasi Server HTTP source Alpha

redis CloudEvents envelopes on the Redis stream a Drasi platform source consumes Alpha

delivery selects when a change counts as handed off, which is the throughput/durability trade:

delivery Replication On failure

acknowledged (default) Advances only once Drasi has the change, so nothing is lost — a stall or crash replays it. A slow or unreachable Drasi slows or stops replication.

on_delivery_error : block (default) retries indefinitely; skip gives up after a bounded budget and continues; fail stops the stream.

queued Never waits for Drasi — the change is queued locally and the replication position acknowledged immediately, with delivery retried in the background. on_delivery_error does not apply.

A failure that could clear is written to a durable dead-letter store under .spice/data/drasi and retried until it lands, surviving a restart. One that never clears is counted and discarded, so it cannot block later changes.

Use queued when Drasi is a downstream consumer whose availability should not pace replication; keep acknowledged when no change may be missed.

Under queued , the replication log is no longer what replays a failure — the dead-letter store is.

Because an insert or update is a full-state replace keyed by element id, redelivery must not be overtaken by newer changes for the same row, so the store is stop-the-line: once anything is pending, later changes queue behind it and delivery resumes only once it drains.

Drasi's view of a dataset advances in order or not at all. The store is capped (1024 batches per component); past that the oldest is discarded and counted, since the newest state for a row is the state worth keeping.

forwarding: disabled keeps a whole block in place without publishing anything, so it can be switched off and back on without reconstructing the endpoint, labels and keys.

Spice's own operational tables can be forwarded the same way, so continuous queries can react to events like a query exceeding its budget or a refresh failing.

These are configured under runtime because they are not CDC-fed from an external source, and they default to on_delivery_error: skip — blocking the runtime's telemetry writer on a downstream outage buys nothing:

runtime : drasi : source_id : spice-runtime params : drasi_http_endpoint : http://localhost:9000 tables :

  • name : task_history

Runtime tables are always queued — they have no replication position to hold, so there is nothing for blocking to protect. Only the tables named are forwarded.

A table's element id comes from its declared primary key ( task_history uses span_id ); a table that declares none — such as runtime.

metrics — must name its identifying columns with key: , since a synthesized id would publish a duplicate node on every delivery retry.

Supported Catalogs

Catalog Connectors connect to external catalog providers and make their tables available for federated SQL query in Spice. The schema hierarchy of the external catalog is preserved.

Name Description Status Protocol/Format

spice.ai Spice.ai Cloud Platform Stable Arrow Flight

unity_catalog Unity Catalog Stable Delta Lake

databricks Databricks Beta Spark Connect, S3/Delta Lake

iceberg Apache Iceberg Beta Parquet

ducklake DuckLake Beta Parquet

glue AWS Glue Alpha CSV, Parquet, Iceberg

pg PostgreSQL (with native WAL CDC catalog acceleration) Beta PostgreSQL Wire Protocol

Supported Secret Stores

Name Description Status

env Environment variables Stable

kubernetes Kubernetes secrets Stable

keyring OS keychain Stable

aws_secrets_manager AWS Secrets Manager Stable

hashicorp_vault HashiCorp Vault Release Candidate

azure_keyvault Azure Key Vault Release Candidate

⚡️ Quickstart (Local Machine)

quickstart.mp4

Installation

Install the Spice CLI:

On macOS, Linux, and WSL :

命令
curl https://install.spiceai.org | /bin/bash

Or using brew :

命令
brew install spiceai/spiceai/spice

On Windows using PowerShell:

iex (( New-Object System.Net.WebClient).DownloadString( " https://install.spiceai.org/Install.ps1 " ))

Note: Native Windows runtime builds are not provided in v2.0+. Use WSL for local development.

Usage

Step 1. Initialize a new Spice app with the spice init command:

spice init spice_qs

A spicepod.yaml file is created in the spice_qs directory. Change to that directory:

命令
cd spice_qs

Step 2. Start the Spice runtime:

spice run

Example output will be shown as follows:

2025/01/20 11:26:10 INFO Spice.ai runtime starting. 2025-01-20T19:26:10.679068Z INFO runtime::init::dataset: No datasets were configured. If this is unexpected, check the Spicepod configuration. 2025-01-20T19:26:10.

679716Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051 2025-01-20T19:26:10.679786Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 127.0.0.1:9090 2025-01-20T19:26:10.

680140Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090 2025-01-20T19:26:10.879126Z INFO runtime::init::results_cache: Initialized sql results cache ; max size: 128.00 MiB, item ttl: 1s

The runtime is now started and ready for queries.

Step 3. In a new terminal window, add the spiceai/quickstart Spicepod. A Spicepod is a package of configuration defining datasets and ML models.

spice add spiceai/quickstart

The spicepod.yaml file will be updated with the spiceai/quickstart dependency.

version : v1 kind : Spicepod name : spice_qs dependencies :

  • spiceai/quickstart

The spiceai/quickstart Spicepod will add a taxi_trips data table to the runtime which is now available to query by SQL.

2025-01-20T19:26:30.011633Z INFO runtime::init::dataset: Dataset taxi_trips registered (s3://spiceai-demo-datasets/taxi_trips/2024/), acceleration (arrow), results cache enabled. 2025-01-20T19:26:30.

013002Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset taxi_trips 2025-01-20T19:26:40.312839Z INFO runtime::accelerated_table::refresh_task: Loaded 2,964,624 rows (399.41 MiB) for dataset taxi_trips in 10s 299ms

Step 4. Start the Spice SQL REPL:

spice sql

The SQL REPL interface will be shown:

Welcome to the Spice.ai SQL REPL ! Type ' help ' for help.

show tables ; -- list available tables sql >

Enter show tables; to display the available tables for query:

sql > show tables ; +---------------+--------------+---------------+------------+ | table_catalog | table_schema | table_name | table_type | +---------------+--------------+---------------+------------+ | spice | public | taxi_trips | BASE TABLE | | spice | runtime | query_history | BASE TABLE | | spice | runtime | metrics | BASE TABLE | +---------------+--------------+---------------+------------+

Time: 0.0

— 本文由 AI 根据公开来源辅助整理,命令、版本与许可证请在使用前到原始页面复核。

安装 / 开始使用

Installation Install the Spice CLI: On macOS, Linux, and WSL :

命令
curl https://install.spiceai.org | /bin/bash

Or using brew :

命令
brew install spiceai/spiceai/spice

On Windows using PowerShell: iex (( New-Object System.Net.WebClient).DownloadString( " https://install.spiceai.org/Install.ps1 " )) Note: Native Windows runtime builds are not provided in v2.0+. Use WSL for local development. Usage Step 1.

Initialize a new Spice app with the spice init command: spice init spice_qs A spicepod.yaml file is created in the spice_qs directory. Change to that directory:

命令
cd spice_qs

Step 2. Start the Spice runtime: spice run Example output will be shown as follows: 2025/01/20 11:26:10 INFO Spice.ai runtime starting. 2025-01-20T19:26:10.679068Z INFO runtime::init::dataset: No datasets were configured.

If this is unexpected, check the Spicepod configuration. 2025-01-20T19:26:10.679716Z INFO runtime::flight: Spice Runtime Flight listening on 127.0.0.1:50051 2025-01-20T19:26:10.679786Z INFO runtime::metrics_server: Spice Runtime Metrics listening on 127.0.0.

1:9090 2025-01-20T19:26:10.680140Z INFO runtime::http: Spice Runtime HTTP listening on 127.0.0.1:8090 2025-01-20T19:26:10.879126Z INFO runtime::init::results_cache: Initialized sql results cache ; max size: 128.

00 MiB, item ttl: 1s The runtime is now started and ready for queries. Step 3. In a new terminal window, add the spiceai/quickstart Spicepod. A Spicepod is a package of configuration defining datasets and ML models. spice add spiceai/quickstart The spicepod.

yaml file will be updated with the spiceai/quickstart dependency. version : v1 kind : Spicepod name : spice_qs dependencies :

The spiceai/quickstart Spicepod will add a taxi_trips data table to the runtime which is now available to query by SQL. 2025-01-20T19:26:30.

011633Z INFO runtime::init::dataset: Dataset taxi_trips registered (s3://spiceai-demo-datasets/taxi_trips/2024/), acceleration (arrow), results cache enabled. 2025-01-20T19:26:30.

013002Z INFO runtime::accelerated_table::refresh_task: Loading data for dataset taxi_trips 2025-01-20T19:26:40.312839Z INFO runtime::accelerated_table::refresh_task: Loaded 2,964,624 rows (399.41 MiB) for dataset taxi_trips in 10s 299ms Step 4.

Start the Spice SQL REPL: spice sql The SQL REPL interface will be shown: Welcome to the Spice.ai SQL REPL ! Type ' help ' for help.

show tables ; -- list available tables sql > Enter show tables; to display the available tables for query: sql > show tables ; +---------------+--------------+---------------+------------+ | table_catalog | table_schema | table_name | table_type | +---------------+--------------+---------------+------------+ | spice | public | taxi_trips | BASE TABLE | | spice | runtime | query_history | BASE TABLE | | spice | runtime | metrics | BASE TABLE | +---------------+--------------+---------------+------------+ Time: 0.

0

  • spiceai/quickstart

来源教程配图

spice oss logo
配图 1 · spice oss logo查看原图
Spice.ai Open Source accelerated data query and LLM-inference engine
配图 2 · Spice.ai Open Source accelerated data query and LLM-inference engine查看原图
How Spice works.
配图 3 · How Spice works.查看原图

适用场景

学习研究
开源项目实践