Blog Native Analytics on Couchbase 4.5

Native Analytics on Couchbase 4.5


Couchbase 4.5 – Native BI Support

This originally appeared as a guest blog on Couchbase.

Earlier this week, Couchbase launched the latest version of its flagship NoSQL database, 4.5, with powerful additions to N1QL, faster queries and indexing, role based security and a range of other features.  

At Knowi, we are pleased to add support for 4.5 to bring native Business Intelligence (BI) integration into Couchbase, leveraging the latest N1QL 4.5 features while maintaining backward compatibility.    

The 4.5 release brings forth a number of query related improvements that are particularly useful from a BI & reporting perspective:

  • A new INFER command to determine fields and associated meta data
  • High performance JOINs with Index-JOIN support
  • Array indexing, that boosts the performance of queries involving arrays
  • Memory-optimized indexes that improves query performance under write-intensive workloads


The new INFER command provides metadata of the document structure, as well as providing a sneak-peek of values within it.

For example, running INFER database in the Couchbase Query Console returns the document structure, fields, type and sample field data:

We utilize the INFER command to determine the fields displayed for dynamic N1QL query generation (for versions prior to 4.5, we fall back to querying the first 100 documents to build the field suggestions).

See this action in few simple steps:

  1. Go to This is pre-populated with a live Couchbase database with travel-sample and beer-sample buckets to easily follow along.
  1. Expand Query Generation section. Choose travel-sample. This triggers the INFER command to determine the fields to populate Metrics, Dimensions, Filters and Sort fields.
  2. Use the dropdowns to auto-generate N1QL queries using a point and click interface to build a simple count aggregation by the type field as below.

     4. Click on Show me to instantly visualize and see results.


N1QL, with SQL like familiarity while fully supporting JSON, is arguably the best query syntax that we’ve worked with, inside the NoSQL ecosystem. If you are using Couchbase or planning to use Couchbase, leverage N1QL to it’s fullest using Knowi, the only fully native end-to-end BI solution on Couchbase.  

Try this with your own data during your 21 day free trial- Click Here.

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email
About the Author: