I am very pleased to announce Couchbase Analytics Developer Preview 2. Couchbase Analytics allows you to analyze data in its natural form without defining a rigid schema and removes the need for expensive data preparation and transformation. Couchbase Analytics complements your existing investments in Analytics and significantly reduces time to insight.
Major features
The salient features of Couchbase Analytics are:
- Rich query language: Couchbase Analytics supports SQL++, a next-generation declarative query language which has much in common with SQL. SQL++ also includes extensions for the nested, schema-optional or even schema-less world of modern NoSQL systems.
- Common data model: Couchbase Analytics natively supports the same rich, flexible-schema document data model used in Couchbase Server, rather than forcing your data into a relational model.
- Workload isolation: Analytical queries are run on dedicated nodes that can run complex resource intensive queries and don’t impact the query latency and throughput of operational workloads.
- High data freshness: Couchbase Analytics uses DCP, a fast memory-to-memory protocol that Couchbase Server nodes use to synchronize data among themselves. Consequently, analytics run on data that is synchronized in almost real-time without the overhead of data ingestion and transformation.
Developer Preview 2 focuses on ease of use and enhances query support to include
- Configurable parallelism: The system can execute each request using multiple cores on multiple machines. A user can manually specify the maximum execution parallelism for a request to scale it up or down.
- Query cancellation: We heard you! Couchbase Analytics supports cancellation of an ongoing query. We also added a “cancel” button on the Analytics workbench.
- Simplified cluster installation: You have the option to deploy the Couchbase Analytics cluster in your data center or on EC2. More details available here.
SDK Support
The SDKs for Java, .NET, node.js, php and python now support Couchbase Analytics. Here is an example of how you would use Couchbase Analytics queries using the Java SDK.
Java SDK (2.4.3 or later)
By default, Analytics support is off and “analyticsEnabled” system property should be set to enable it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
System.setProperty("com.couchbase.analyticsEnabled", "true"); AnalyticsQueryResult result = bucket.query(AnalyticsQuery.simple("SELECT bw.name AS brewer,(SELECT br.name, br.abv FROM beers br WHERE br.brewery_id = meta(bw).id) AS beers " + "FROM breweries bw " + "ORDER BY bw.name " + "LIMIT 5;")); for (AnalyticsQueryRow row:result) { System.out.println(row.toString()); } |
Go ahead and give it a try by downloading the binary and starting with the tutorial.
We invite you to join us at Couchbase Connect NYC for more on Couchbase Analytics.