| name | analytics-rust |
| summary | The Analytics Service is not supported by the Couchbase Rust SDK 1.0 — alternatives and workarounds |
| description | The Analytics Service is not supported by the Couchbase Rust SDK 1.0 — alternatives and workarounds |
| compatibility | Rust SDK 1.0. Analytics Service not supported. |
| metadata | {"last_verified":"2026-05","handoff":[{"condition":"user asks about SQL++ queries as an alternative to Analytics","skill":"server-querying-rust"},{"condition":"user asks about Analytics in a supported language","skill":"analytics-python"},{"condition":"user asks about connection setup or SDK configuration","skill":"server-connection-rust"}]} |
Analytics Service — Rust
Rust SDK 1.0 does not include an Analytics Service API. cluster.analytics_query() does not exist.
Alternatives
Option 1 — Use the Analytics HTTP REST API directly:
The Analytics Service exposes a REST endpoint at port 8095. Call it with reqwest or any HTTP client:
use reqwest::Client;
use serde_json::json;
let client = Client::new();
let body = json!({
"statement": "SELECT airline, COUNT(*) AS cnt FROM `travel-sample`.inventory.route GROUP BY airline ORDER BY cnt DESC LIMIT 10"
});
let resp = client
.post("http://localhost:8095/analytics/service")
.basic_auth("Administrator", Some("password"))
.json(&body)
.send()
.await?;
let result: serde_json::Value = resp.json().await?;
for row in result["results"].as_array().unwrap_or(&vec![]) {
println!("{}", row);
}
For Capella, use https://<host>:18095/analytics/service with your database credentials.
Option 2 — Use SQL++ (Query Service) for analytical-style queries:
For most aggregation and reporting use cases on a single cluster, SQL++ via cluster.query() covers the same ground as Analytics. Analytics adds value for long-running OLAP workloads that should not compete with operational traffic.
let result = cluster
.query(
"SELECT airline, COUNT(*) AS cnt FROM `travel-sample`.inventory.route GROUP BY airline ORDER BY cnt DESC LIMIT 10",
QueryOptions::default(),
)
.await?;
for row in result.rows::<serde_json::Value>().await? {
println!("{:?}", row?);
}
See the server-querying-rust skill.
Option 3 — Use a supported SDK:
If the Analytics Service API is a hard requirement, Python, Java, Go, .NET, Node.js, PHP, Scala, and Ruby SDKs all support it. See the analytics-python skill as a starting point.
When Analytics Support Is Added
Monitor the Couchbase Rust SDK release notes for Analytics support in future versions.