Deep Dive: Window Functions in Couchbase Analytics

Window Functions

Couchbase Server 6.5 Beta brings a host of new features to the leading NoSQL database. One of the key additions to the N1QL query language is support for window functions. These functions were originally introduced in the SQL:2003 standard and provide a performant way of answering many complex business queries. Window functions were previously discussed in this series of posts [2], [3], [4]. In this installment, we’ll dive deep into their implementations in Couchbase Analytics.

You may also like:  Cost-Based Optimizer for Couchbase N1QL (SQL for JSON)

The Couchbase Analytics service [5] is designed to handle complex ad-hoc queries in the Couchbase data platform. Its key component is the MPP query engine that runs on a separate set of nodes in the cluster to guarantee workload isolation for the operational data nodes. Data is ingested into Analytics using the DCP change protocol [6] and is hash-partitioned among all available Analytics nodes. The MPP query processor divides a single query into subtasks and schedules those to run in parallel on all nodes, repartitioning data if necessary.

Build a Real-Time Data Visualization Dashboard With Couchbase Analytics and Tableau

Introduction

Couchbase Server is a hybrid NoSQL database that supports operational and analytical workloads. Couchbase Analytics in Couchbase Server 6.0 brings "NoETL for NoSQL," enabling users to run ad-hoc analytical queries on JSON data in their natural form — without the need for transformation or schema design — by leveraging a massively parallel processing (MPP) query engine.

Every enterprise has already invested in a visualization tool and therefore has a critical need to leverage existing investments. This includes not only tooling but also skillsets and training of business reporting and dash-boarding teams.