Wednesday, June 3, 2015

Couchbase & N1QL Support


Today, at Couchbase Connect 15, we are thrilled to unveil support for Couchbase. The solution enables Couchbase users to go from data to insights from Couchbase like never before.


The integration leverages Couchbase N1QL (“Nickel”), a powerful query language that not only provides SQL familiarity, but also works with multi-value attributes and nested objects within Couchbase Server. Cloud9 Charts enables data discovery, N1QL query generation, analysis, data blending & multi-datasource joins, along with easily shareable, embeddable dashboards from Couchbase data.


Macintosh HD:Users:gopalaj61:Dropbox:c9 Screenshots:Screen Shot 2015-05-23 at 11.18.32 AM.png

Overview of the Combined Solution:
  1. Eliminates the need for ETL into relational databases for BI purposes.
  2. Native integration with N1QL without shoehorning unstructured data to a relational form.
  3. Data Discovery: Connect and discover buckets & fields.
  4. Query Generation: Automatically generate and explore N1QL queries and aggregations using a visual interface.
  5. Advanced Enterprise Analytics: Perform complex analytics, filters and merge/join data from multiple Couchbase buckets along with other structured and unstructured data sources.
  6. Instant Visualizations: Generate shareable, embeddable dashboards.
  7. Connect from the Cloud or on-premise.


Let’s take a hands-on look at how to generate visual insights from Couchbase instantly using N1QL and Cloud9 Charts.


Getting Started:
Please visit our Couchbase Instant Analytics page to get started. The page is pre-populated with settings to a live demo Couchbase database to make it easier to follow along.


Macintosh HD:Users:gopalaj61:Dropbox:c9 Screenshots:Screen Shot 2015-05-23 at 8.38.12 PM.png
The Report section contains a N1QL query that looks like the following:


select count(name) as `Count of name`, `type`
from `beer-sample`
group by `type`
limit 10000
This is a simple aggregation that groups the counts by type from a beer-sample bucket.


Click on the Show Me button. This will execute the N1QL query and visualizations are automatically created:  


Macintosh HD:Users:gopalaj61:Desktop:Screen Shot 2015-05-23 at 8.25.43 PM.png

Now, let’s add a Geo heatmap of brewery locations to the same dashboard. In the following section, we’ll discover geo fields, auto generate N1QL queries and set up a geo heatmap visualization.


1. Click the ‘Sign Up’ button to create and save the account (it’s free to get started).


2. Click on Data sources from the settings menu. Select Couchbase use the default demo database for Couchbase.
Macintosh HD:Users:gopalaj61:Desktop:Screen Shot 2015-05-24 at 3.13.29 PM.png

Note: Alternatively, you can also connect to your own Couchbase instance. If the database is inside your network, follow the prompts to download the agent. The agent can facilitate secure connectivity to your own database inside your network.


3. Click on Configure Queries. From the Query generator section,
i. set the Report Name to Brewery Locations.
ii. Choose the beer-sample bucket. This will trigger a field discovery process to determine a set of fields associated to the bucket.
        iii. Within the metrics dropdown, click to select geo and name as metrics
iv. Click on filters, select type and enter brewery
Note that the queries will be auto-generated as you add/change any of the fields. You can also plug in queries directly. The N1QL looks like this:
select `geo`, `name`
from `beer-sample`
where `type` = "brewery"
limit 10000


v. Click on preview for immediate preview of the data.
vi. Save the Report.


4. Click on Dashboards. Drag & drop the newly created report into the dashboard. From the widget settings menu, change the widget to a Geo Heatmap, as shown in the GIF below:






Summary


In a few simple steps, we’ve used N1QL on Couchbase to derive insights on the data with easily customizable, shareable and embeddable dashboards.


Macintosh HD:Users:gopalaj61:Dropbox:c9 Screenshots:Screen Shot 2015-05-24 at 3.23.50 PM.png

Meet us at Couchbase Connect!
We’ll be at hand at Couchbase Connect on June 3rd and June 4th. Email us or ping us on twitter to meet with our team!