Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ datafusion-federation-sql = { git = "https://github.com/spiceai/datafusion-feder
datafusion-functions-json = "0.45"
datafusion-table-providers = "0.1"
dotenvy = "0.15"
duckdb = "1.1.3"
duckdb = "1.2.2"
fundu = "2.0.1"
futures = "0.3.30"
globset = "0.4.16"
Expand Down Expand Up @@ -168,7 +168,7 @@ datafusion-expr = { git = "https://github.com/spiceai/datafusion.git", rev = "e0
datafusion-federation = { git = "https://github.com/spiceai/datafusion-federation.git", rev = "1c814422cfbdeb7f7bd2399e3369656710413aa8" } # spiceai-45
datafusion-table-providers = { git = "https://github.com/datafusion-contrib/datafusion-table-providers.git", rev = "f60653b6ff9a0f26e5b44a1d43d947fdf1fd8853" } # spiceai

duckdb = { git = "https://github.com/spiceai/duckdb-rs.git", rev = "2e24b958e44ec7419290249e27a15f1a19703fff" } # spiceai-1.1.3-backported-arrow-54
duckdb = { git = "https://github.com/spiceai/duckdb-rs.git", rev = "b850ae60dbe67209320c86daeadf47b51f937660" } # spiceai-1.2.2

rusqlite = { git = "https://github.com/spiceai/rusqlite.git", rev = "97054b6af725caf5d3e952e349746706e00d0ea5" }

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Limited = Partial or restricted support
- **OpenAI-compatible API**: Connect to hosted models (OpenAI, Anthropic, xAI) or deploy locally (Llama, NVIDIA NIM). [AI Gateway Recipe](https://github.com/spiceai/cookbook/blob/trunk/openai_sdk/README.md)
- **Federated Data Access**: Query using SQL and NSQL (text-to-SQL) across databases, data warehouses, and data lakes with advanced query push-down for fast retrieval across disparate data sources. [Federated SQL Query Recipe](https://github.com/spiceai/cookbook/blob/trunk/federation/README.md)
- **Search and RAG**: Search and retrieve context with accelerated embeddings for retrieval-augmented generation (RAG) workflows. [Vector Search over GitHub Files](https://github.com/spiceai/cookbook/blob/trunk/search_github_files/README.md)
- **LLM Memory and Observability**: Store and retrieve history and context for AI agents while gaining deep visibility into data flows, model performance, and traces. [LLM Memory Recipe](https://github.com/spiceai/cookbook/blob/trunk/llm-memory/README.md) | [Monitoring Features Documentation](https://spiceai.org/docs/features/monitoring)
- **LLM Memory and Observability**: Store and retrieve history and context for AI agents while gaining deep visibility into data flows, model performance, and traces. [LLM Memory Recipe](https://github.com/spiceai/cookbook/blob/trunk/llm-memory/README.md) | [Observability & Monitoring Features Documentation](https://spiceai.org/docs/features/observability)

### Database CDN and Query Mesh

Expand Down Expand Up @@ -181,7 +181,7 @@ See more demos on [YouTube](https://www.youtube.com/playlist?list=PLesJrUXEx3U9a
| `mongodb` | MongoDB | Coming Soon | |
| `elasticsearch` | ElasticSearch | Roadmap | |

[databricks]: https://github.com/spiceai/cookbook/tree/trunk/databricks/delta_lake
[databricks]: https://github.com/spiceai/cookbook/blob/trunk/databricks/README.md
[spark]: https://spark.apache.org/docs/latest/spark-connect-overview.html
[s3]: https://github.com/spiceai/cookbook/tree/trunk/s3#readme
[spiceai]: https://github.com/spiceai/cookbook/tree/trunk/spiceai#readme
Expand Down Expand Up @@ -526,7 +526,7 @@ Spice.ai is designed to be extensible with extension points documented at [EXTEN

### 🔨 Upcoming Features

🚀 See the [Roadmap to v1.0-stable](https://github.com/spiceai/spiceai/blob/trunk/docs/ROADMAP.md) for upcoming features.
🚀 See the [Roadmap](https://github.com/spiceai/spiceai/blob/trunk/docs/ROADMAP.md) for upcoming features.

### 🤝 Connect with us

Expand All @@ -536,6 +536,6 @@ We greatly appreciate and value your support! You can help Spice in a number of
- [File an issue](https://github.com/spiceai/spiceai/issues/new) if you see something not quite working correctly.
- Join our team ([We’re hiring!](https://spice.ai/careers))
- Contribute code or documentation to the project (see [CONTRIBUTING.md](CONTRIBUTING.md)).
- Follow our blog at [blog.spiceai.org](https://blog.spiceai.org)
- Follow our blog at [spiceai.org/blog](https://spiceai.org/blog)

⭐️ star this repo! Thank you for your support! 🙏
8 changes: 6 additions & 2 deletions crates/runtime/src/http/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ pub enum ResponseMimeType {
Json,
Csv,
Plain,
VndNsqlJsonV1,
VndSqlJsonV1,
}

Expand Down Expand Up @@ -134,6 +135,7 @@ impl ResponseMimeType {
.iter()
.find_map(|h| match h.as_str() {
"application/json" => Some(ResponseMimeType::Json),
"application/vnd.spiceai.nsql.v1+json" => Some(ResponseMimeType::VndNsqlJsonV1),
"application/vnd.spiceai.sql.v1+json" => Some(ResponseMimeType::VndSqlJsonV1),
"text/csv" => Some(ResponseMimeType::Csv),
"text/plain" => Some(ResponseMimeType::Plain),
Expand Down Expand Up @@ -207,7 +209,9 @@ pub async fn to_http_response(
ResponseMimeType::Json => arrow_to_json(&data),
ResponseMimeType::Csv => arrow_to_csv(&data),
ResponseMimeType::Plain => arrow_to_plain(&data),
ResponseMimeType::VndSqlJsonV1 => arrow_to_vnd_sql_json_v1(&data, meta),
ResponseMimeType::VndSqlJsonV1 | ResponseMimeType::VndNsqlJsonV1 => {
arrow_to_vnd_sql_json_v1(&data, meta)
}
};

let body = match res {
Expand Down Expand Up @@ -287,7 +291,7 @@ fn arrow_to_plain(
pretty_format_batches(data).map(|d| format!("{d}")).boxed()
}

/// Converts a vector of `RecordBatch` to an application/vnd.spiceai.sql.v1+json format
/// Converts a vector of `RecordBatch` to an application/vnd.spiceai.sql.v1+json / application/vnd.spiceai.nsql.v1+json format
fn arrow_to_vnd_sql_json_v1(
data: &[RecordBatch],
meta: ResponseMetadata,
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime/src/http/v1/nsql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fn return_sql_only(accept: Option<&TypedHeader<Accept>>) -> bool {
operation_id = "post_nsql",
tag = "SQL",
params(
("Accept" = String, Header, description = "The format of the response, one of 'application/json' (default), 'application/sql', 'text/csv' or 'text/plain'. 'application/sql' will only return the SQL query generated by the model."),
("Accept" = String, Header, description = "The format of the response, one of 'application/json' (default), 'application/vnd.spiceai.nsql.v1+json', 'application/sql', 'text/csv' or 'text/plain'. 'application/sql' will only return the SQL query generated by the model."),
),
request_body(
description = "Request body to generate an NSQL query",
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime/src/http/v1/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use super::{ResponseMimeType, sql_to_http_response};
operation_id = "post_sql",
tag = "SQL",
params(
("Accept" = String, Header, description = "The format of the response, one of 'application/json' (default), 'text/csv' or 'text/plain'."),
("Accept" = String, Header, description = "The format of the response, one of 'application/json' (default), 'application/vnd.spiceai.sql.v1+json', 'text/csv' or 'text/plain'."),
),
request_body(
description = "SQL query to execute",
Expand Down
131 changes: 131 additions & 0 deletions docs/release_notes/v1.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Spice v1.1.2 (Apr 14, 2025)

Spice v1.1.2 improves Delta Lake Data Connector performance, introduces new Accept headers for the `/v1/sql` and `/v1/nsql` endpoints to include query metadata with results, and resolves an issue with the Snowflake Data Connector when handling wide tables (>600 columns).

The official Tableau Connector for Spice.ai v0.1 has been released, making it easy to connect to both self-hosted Spice.ai and Spice Cloud instances using Tableau.

## What's New in v1.1.2

- **Tableau Connector for Spice.ai**: Released the initial version (v0.1) of the official Tableau Taco Connector (fully open-source), enabling data visualization and analytics in Tableau with self-hosted Spice.ai and Spice Cloud deployments.

- Official Release: [github.com/spicehq/tableau-connector/releases/tag/v0.1.0](https://github.com/spicehq/tableau-connector/releases/tag/v0.1.0)
- Docs: [spiceai.org/docs/clients/tableau](https://spiceai.org/docs/clients/tableau)
- Open Source Repository: [github.com/spiceai/tableau-connector](https://github.com/spiceai/tableau-connector)

- **Delta Lake Data Connector**: Upgraded `delta_kernel` to v0.9, and optimized scan operations, reducing query execution time by up to 20% on large datasets.

- **Snowflake Data Connector**: Fixed a bug that caused failures when loading tables with more than 600 columns.

- **Query Metadata (SQL and NSQL)**: Added support for the `application/vnd.spiceai.sql.v1+json` Accept header on the `/v1/sql` endpoint, and the `application/vnd.spiceai.nsql.v1+json` Accept header on the `/v1/nsql` endpoint, enabling responses to include metadata such as the executed SQL query and schema alongside results.

Example:

```bash
curl -XPOST "http://localhost:8090/v1/nsql" \
-H "Content-Type: application/json" \
-H "Accept: application/vnd.spiceai.nsql.v1+json" \
-d '{
"query": "What’s the highest tip any passenger gave?"
}' | jq
```

Example response:

```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\""
}
```

For details, see the [SQL Query API](https://spiceai.org/docs/api/HTTP/post-sql) and [NSQL API](https://spiceai.org/docs/api/HTTP/post-nsql) documentation.

## Contributors

- [@ewgenius](https://github.com/ewgenius)
- [@peasee](https://github.com/peasee)
- [@lukekim](https://github.com/lukekim)
- [@phillipleblanc](https://github.com/phillipleblanc)
- [@Sevenannn](https://github.com/Sevenannn)
- [@sgrebnov](https://github.com/sgrebnov)
- [@kczimm](https://github.com/kczimm)

## Breaking Changes

No breaking changes in this release.

## Cookbook Updates

No major cookbook additions.

The [Spice Cookbook](https://spiceai.org/cookbook) now includes 65 recipes to help you get started with Spice quickly and easily.

## Upgrading

To upgrade to v1.1.2, use one of the following methods:

**CLI**:

```console
spice upgrade
```

**Homebrew**:

```console
brew upgrade spiceai/spiceai/spice
```

**Docker**:

Pull the `spiceai/spiceai:1.1.2` image:

```console
docker pull spiceai/spiceai:1.1.2
```

For available tags, see [DockerHub](https://hub.docker.com/r/spiceai/spiceai/tags).

**Helm**:

```console
helm repo update
helm upgrade spiceai spiceai/spiceai
```

## What's Changed

### Dependencies

- **[delta_kernel](https://crates.io/crates/delta_kernel/0.9.0):** updated to v0.9.0.

### Changelog

- Backport - Fix schema inference for Snowflake tables with large number of columns #5348 by [@ewgenius](https://github.com/ewgenius) in [#5350](https://github.com/spiceai/spiceai/pull/5350)
- Upgrade `delta_kernel` to 0.9 (#5343) by [@phillipleblanc](https://github.com/phillipleblanc) in [#5356](https://github.com/spiceai/spiceai/pull/5356)
- Add basic support for `application/vnd.spiceai.sql.v1+json` format (#5333) by [@sgrebnov](https://github.com/sgrebnov) in [#5333](https://github.com/spiceai/spiceai/pull/5333)
- Convert DataFusion filters to Delta Kernel predicates by [@phillipleblanc](https://github.com/phillipleblanc) in [#5362](https://github.com/spiceai/spiceai/pull/5362)
- revert to previous pdf-extract; remove test for encrypted pdf support by [@kczimm](https://github.com/kczimm) in [#5355](https://github.com/spiceai/spiceai/pull/5355)
- Turn off `delta_kernel::log_segment` logging and refactor log filtering by [@phillipleblanc](https://github.com/phillipleblanc) in [#5367](https://github.com/spiceai/spiceai/pull/5367)
- Extend `application/vnd.spiceai.sql.v1+json` with `schema` and `row_count` fields by [@sgrebnov](https://github.com/sgrebnov) in [#5365](https://github.com/spiceai/spiceai/pull/5365)
- Make separate `vnd.spiceai.sql.v1+json` and `vnd.spiceai.nsql.v1+json` MIME types by [@sgrebnov](https://github.com/sgrebnov) in [#5382](https://github.com/spiceai/spiceai/pull/5382)

**Full Changelog**: [v1.1.1...v1.1.2](https://github.com/spiceai/spiceai/compare/v1.1.1...v1.1.2)
Loading