Filter Data from Couchbase 6 Using N1QL
This course covers the searching of documents in Couchbase using the N1QL query language. There is a focus on defining filters based on the document attributes, whether they are primitive types such as numbers or complex data such as arrays.
What you'll learn
There are a variety of ways to filter queries in Couchbase. In this course, Filter Data from Couchbase Using N1QL, you will get some hands on experience in writing queries to retrieve documents from a Couchbase database using filters you have defined. These queries will be written in the N1QL query language which has a SQL-like syntax to work with JSON data.
First, you will explore how documents can be searched using the Couchbase web UI and how this interface allows you to define filters based a document key and also on the values of its attributes.
Next, you will cover some of the basics of querying in the N1QL query language - such as the SELECT, FROM and WHERE clauses of a N1QL query - and will also take a brief look at adding and updating documents using INSERT and UPDATE queries. Then, you will move on to the filtering of documents based on the values of their attributes using a variety of comparison operators.
Finally, you will delve into filtering documents based on the contents of nested structures such as arrays and objects. This includes the use of collection operators, invoking built-in array functions and also generating slices of arrays.
By the end of this course, you will have the skills required to run a variety of filter queries on the data you have stored in a Couchbase database.
Table of contents
- Basic N1QL Queries 8m
- The CBQ Shell 3m
- Creating a Bucket 2m
- Inserting Documents Into a Bucket 7m
- Updating and Deleting Documents 3m
- The USE KEYS Clause 5m
- Modifying the SELECT Clause with DISTINCT and RAW 7m
- The ORDER BY Clause 4m
- An Overview of Query Plans 4m
- The WHERE Clause 5m
- An Introduction to Subqueries 5m
- Data Types in Couchbase 3m
- Demo: An Introduction to Arrays 5m
- Demo: Working with Objects 6m
- Demo: Arrays of Objects in N1QL 6m
- Demo: The ANY Operator 6m
- Demo: The EVERY Operator 6m
- Demo: The ARRAY Operator 6m
- Demo: The FIRST Operator 4m
- Demo: The WITHIN Operator 5m
- Demo: Array Slicing 5m
- Demo: Array Funtions 6m