SQL++ - Setup

SQL++/N1QL (pronounced “nickel”) is Couchbase’s next-generation query language. N1QL aims to meet the query needs of distributed document-oriented databases. This document specifies the pre-requisites to run these examples against Couchbase Capella.

In order for this script to work, you need to create three buckets on the Capella interface.

Steps

1. Go to your cluster in Capella.

2. Click on Buckets tab in the view.

3. Click on Create Bucket

4. Fill out the details to create the Bucket

4.1 Enter the name of the Bucket in Bucket Name field (tutorial, ecommerce, jungleville)

4.2 Leave Memory requirements with the default value (100) in Memory field

4.3 Leave the Settings in Default values.

4.4 Click on Create Bucket.

5. The Bucket will get created in a few seconds.

If you want to see it visually, you can check out the animation below.



Now you can run the script in the code window to create the collections, import data and create indexes automatically.


To run this example, click the button in the top right corner of the code editor.

Code Editor

Output