SlideShare a Scribd company logo
Lab: Mango (30 minutes)
Bradley Holt, Developer Advocate
Thursday, February 9, 2017
CouchDB Developer Day
@BradleyHolt
Prerequisite: Replication Lab
@BradleyHolt
CouchDB Day NYC 2017: Mango
Mango
 Declarative indexes
 MongoDB-style query language
 You can still use map/reduce views
@BradleyHolt
http-console
$ npm install http-console -g
@BradleyHolthttps://github.com/cloudhead/http-console
http-console
$ npm install http-console -g
$ http-console 127.0.0.1:5984
@BradleyHolthttps://github.com/cloudhead/http-console
http-console
$ npm install http-console -g
$ http-console 127.0.0.1:5984
> http-console 0.6.3
> Welcome, enter .help if you're lost.
> Connecting to 127.0.0.1 on port 5984.
@BradleyHolthttps://github.com/cloudhead/http-console
Connecting to CouchDB 2.0
$ http-console root:passw0rd@127.0.0.1:5984 --json
@BradleyHolt
Connecting to CouchDB 2.0
$ http-console root:passw0rd@127.0.0.1:5984 --json
> http-console 0.6.3
> Welcome, enter .help if you're lost.
> Connecting to 127.0.0.1 on port 5984.
@BradleyHolt
Connecting to IBM Cloudant
$ http-console https://bradley-holt:passw0rd@bradley-holt.cloudant.com --json
@BradleyHolt
Connecting to IBM Cloudant
$ http-console https://bradley-holt:passw0rd@bradley-holt.cloudant.com --json
> http-console 0.6.3
> Welcome, enter .help if you're lost.
> Connecting to bradley-holt.cloudant.com on port 443.
@BradleyHolt
Mango
/>
@BradleyHolt
Mango
/> /kittens
@BradleyHolt
Mango
/kittens>
@BradleyHolt
Mango
/kittens> POST /_index
@BradleyHolt
Mango
/kittens> POST /_index
...
@BradleyHolt
Mango
/kittens> POST /_index
... { "index": { "fields": [ "age_weeks", "weight_kilograms" ] } }
@BradleyHolt
Mango
/kittens> POST /_index
... { "index": { "fields": [ "age_weeks", "weight_kilograms" ] } }
HTTP/1.1 200 OK
Content-Type: application/json
{
result: 'created',
id: '_design/e19dde7f518129a966ebe072edc66be88d54e694',
name: 'e19dde7f518129a966ebe072edc66be88d54e694'
}
@BradleyHolt
@BradleyHolt
Mango
/kittens>
@BradleyHolt
Mango
/kittens> POST /_find
@BradleyHolt
Mango
/kittens> POST /_find
...
@BradleyHolt
Mango
/kittens> POST /_find
... { "selector": { "age_weeks": { "$gte": 7, "$lte": 10 } }, "fields": [ "_id", "age_weeks" ] }
@BradleyHolt
Mango
/kittens> POST /_find
... { "selector": { "age_weeks": { "$gte": 7, "$lte": 10 } }, "fields": [ "_id", "age_weeks" ] }
HTTP/1.1 200 OK
Content-Type: application/json
{
docs: [
{ _id: 'tiger', age_weeks: 7 },
{ _id: 'daisy', age_weeks: 9 },
{ _id: 'mittens', age_weeks: 10 }
]
}
@BradleyHolt
@BradleyHolt
Mango
/kittens>
@BradleyHolt
Mango
/kittens> POST /_find
@BradleyHolt
Mango
/kittens> POST /_find
...
@BradleyHolt
Mango
/kittens> POST /_find
... { "selector": { "age_weeks": { "$gte": 0 }, "weight_kilograms": { "$gte": 0.5, "$lte": 1 } }, "fields": [ "_id",
"weight_kilograms" ] }
@BradleyHolt
Mango
/kittens> POST /_find
... { "selector": { "age_weeks": { "$gte": 0 }, "weight_kilograms": { "$gte": 0.5, "$lte": 1 } }, "fields": [ "_id",
"weight_kilograms" ] }
HTTP/1.1 200 OK
Content-Type: application/json
{
docs: [
{ _id: 'tiger', weight_kilograms: 0.726 },
{ _id: 'daisy', weight_kilograms: 0.816 },
{ _id: 'mittens', weight_kilograms: 0.997 }
]
}
@BradleyHolt
@BradleyHolt
Try It On Your Own
1. Create an index of kittens by weight_kilograms and age_weeks (in that order)
2. Find kittens weighing less than 1 kilogram who are 7 weeks or older
@BradleyHolt
Image Credit
 Mango with section on a white background by bangdoll, on Flickr <https://flic.kr/p/9CBP2h>
@BradleyHolt
Lab: Mango
CouchDB Developer Day
@BradleyHolt

More Related Content

What's hot (20)

PDF
Web Scrapping with Python
Miguel Miranda de Mattos
 
PDF
Fun with Python
Narong Intiruk
 
PDF
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
Ajeet Singh Raina
 
PDF
RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK - Nicola Iarocci - Co...
Codemotion
 
PDF
Tupperware
Hiromu Shioya
 
PDF
Scrapy workshop
Karthik Ananth
 
PDF
How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...
Anton
 
PDF
Webscraping with asyncio
Jose Manuel Ortega Candel
 
PPTX
DevOps and Chef
PiXeL16
 
PDF
Gaelyk
Kazuchika Sekiya
 
PDF
Pydata-Python tools for webscraping
Jose Manuel Ortega Candel
 
PPTX
2015 555 kharchenko_ppt
Maxym Kharchenko
 
PDF
Javascript Continues Integration in Jenkins with AngularJS
Ladislav Prskavec
 
PDF
Apache CouchDB talk at Ontario GNU Linux Fest
Myles Braithwaite
 
PDF
Selenium sandwich-3: Being where you aren't.
Workhorse Computing
 
PDF
Application Logging With The ELK Stack
benwaine
 
PPTX
Commit2015 kharchenko - python generators - ext
Maxym Kharchenko
 
PDF
Fake My Party
Tanja Otto
 
PPT
Web Scraper Shibuya.pm tech talk #8
Tatsuhiko Miyagawa
 
PDF
Docker for data science
Calvin Giles
 
Web Scrapping with Python
Miguel Miranda de Mattos
 
Fun with Python
Narong Intiruk
 
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
Ajeet Singh Raina
 
RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK - Nicola Iarocci - Co...
Codemotion
 
Tupperware
Hiromu Shioya
 
Scrapy workshop
Karthik Ananth
 
How to Scrap Any Website's content using ScrapyTutorial of How to scrape (cra...
Anton
 
Webscraping with asyncio
Jose Manuel Ortega Candel
 
DevOps and Chef
PiXeL16
 
Pydata-Python tools for webscraping
Jose Manuel Ortega Candel
 
2015 555 kharchenko_ppt
Maxym Kharchenko
 
Javascript Continues Integration in Jenkins with AngularJS
Ladislav Prskavec
 
Apache CouchDB talk at Ontario GNU Linux Fest
Myles Braithwaite
 
Selenium sandwich-3: Being where you aren't.
Workhorse Computing
 
Application Logging With The ELK Stack
benwaine
 
Commit2015 kharchenko - python generators - ext
Maxym Kharchenko
 
Fake My Party
Tanja Otto
 
Web Scraper Shibuya.pm tech talk #8
Tatsuhiko Miyagawa
 
Docker for data science
Calvin Giles
 

Similar to CouchDB Day NYC 2017: Mango (20)

PDF
Python-CouchDB Training at PyCon PL 2012
Stefan Kögl
 
KEY
Couchdb: No SQL? No driver? No problem
delagoya
 
ODP
Intro to CouchDB
sbisbee
 
PDF
Introduction to CouchDB - LA Hacker News
Michael Parker
 
PDF
Introduction to CouchDB
Bogdan Sabău
 
KEY
CouchDB : More Couch
delagoya
 
PDF
Introduction to couchdb
iammutex
 
PDF
CouchDB Mobile - From Couch to 5K in 1 Hour
Peter Friese
 
PPTX
CouchDB Day NYC 2017: Core HTTP API
IBM Cloud Data Services
 
KEY
OSCON 2011 CouchApps
Bradley Holt
 
PPTX
Indexing and Query Optimization
MongoDB
 
PPTX
Full Stack Development with Node.js and NoSQL
All Things Open
 
PPTX
Full stack development with node and NoSQL - All Things Open - October 2017
Matthew Groves
 
PPT
No sql Database
mymail2ashok
 
KEY
OSCON 2011 Learning CouchDB
Bradley Holt
 
PPT
Building Your First MongoDB App ~ Metadata Catalog
hungarianhc
 
PDF
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
ichikaway
 
PDF
How to use MongoDB with CakePHP
ichikaway
 
PPTX
Back to Basics Webinar 2 - Your First MongoDB Application
Joe Drumgoole
 
PPTX
Back to Basics Webinar 2: Your First MongoDB Application
MongoDB
 
Python-CouchDB Training at PyCon PL 2012
Stefan Kögl
 
Couchdb: No SQL? No driver? No problem
delagoya
 
Intro to CouchDB
sbisbee
 
Introduction to CouchDB - LA Hacker News
Michael Parker
 
Introduction to CouchDB
Bogdan Sabău
 
CouchDB : More Couch
delagoya
 
Introduction to couchdb
iammutex
 
CouchDB Mobile - From Couch to 5K in 1 Hour
Peter Friese
 
CouchDB Day NYC 2017: Core HTTP API
IBM Cloud Data Services
 
OSCON 2011 CouchApps
Bradley Holt
 
Indexing and Query Optimization
MongoDB
 
Full Stack Development with Node.js and NoSQL
All Things Open
 
Full stack development with node and NoSQL - All Things Open - October 2017
Matthew Groves
 
No sql Database
mymail2ashok
 
OSCON 2011 Learning CouchDB
Bradley Holt
 
Building Your First MongoDB App ~ Metadata Catalog
hungarianhc
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
ichikaway
 
How to use MongoDB with CakePHP
ichikaway
 
Back to Basics Webinar 2 - Your First MongoDB Application
Joe Drumgoole
 
Back to Basics Webinar 2: Your First MongoDB Application
MongoDB
 
Ad

More from IBM Cloud Data Services (16)

PPTX
CouchDB Day NYC 2017: Using Geospatial Data in Cloudant & CouchDB
IBM Cloud Data Services
 
PDF
Practical Use of a NoSQL
IBM Cloud Data Services
 
PPTX
I See NoSQL Document Stores in Geospatial Applications
IBM Cloud Data Services
 
PPTX
Webinar: The Anatomy of the Cloudant Data Layer
IBM Cloud Data Services
 
PPTX
NoSQL for SQL Users
IBM Cloud Data Services
 
PPTX
dashDB: the GIS professional’s bridge to mainstream IT systems
IBM Cloud Data Services
 
PDF
Cloud Data Services: A Brand New Ballgame for Business
IBM Cloud Data Services
 
PPTX
Practical Use of a NoSQL Database
IBM Cloud Data Services
 
PPTX
SQL To NoSQL - Top 6 Questions Before Making The Move
IBM Cloud Data Services
 
PPTX
Machine Learning with Apache Spark
IBM Cloud Data Services
 
PPTX
Mobile App Development With IBM Cloudant
IBM Cloud Data Services
 
PPT
IBM Cognos Business Intelligence using dashDB
IBM Cloud Data Services
 
PPTX
Run Oracle Apps in the Cloud with dashDB
IBM Cloud Data Services
 
PDF
Analyzing GeoSpatial data with IBM Cloud Data Services & Esri ArcGIS
IBM Cloud Data Services
 
PDF
Get Started Quickly with IBM's Hadoop as a Service
IBM Cloud Data Services
 
PDF
Introducing dashDB MPP: The Power of Data Warehousing in the Cloud
IBM Cloud Data Services
 
CouchDB Day NYC 2017: Using Geospatial Data in Cloudant & CouchDB
IBM Cloud Data Services
 
Practical Use of a NoSQL
IBM Cloud Data Services
 
I See NoSQL Document Stores in Geospatial Applications
IBM Cloud Data Services
 
Webinar: The Anatomy of the Cloudant Data Layer
IBM Cloud Data Services
 
NoSQL for SQL Users
IBM Cloud Data Services
 
dashDB: the GIS professional’s bridge to mainstream IT systems
IBM Cloud Data Services
 
Cloud Data Services: A Brand New Ballgame for Business
IBM Cloud Data Services
 
Practical Use of a NoSQL Database
IBM Cloud Data Services
 
SQL To NoSQL - Top 6 Questions Before Making The Move
IBM Cloud Data Services
 
Machine Learning with Apache Spark
IBM Cloud Data Services
 
Mobile App Development With IBM Cloudant
IBM Cloud Data Services
 
IBM Cognos Business Intelligence using dashDB
IBM Cloud Data Services
 
Run Oracle Apps in the Cloud with dashDB
IBM Cloud Data Services
 
Analyzing GeoSpatial data with IBM Cloud Data Services & Esri ArcGIS
IBM Cloud Data Services
 
Get Started Quickly with IBM's Hadoop as a Service
IBM Cloud Data Services
 
Introducing dashDB MPP: The Power of Data Warehousing in the Cloud
IBM Cloud Data Services
 
Ad

Recently uploaded (20)

PDF
Troubleshooting Virtual Threads in Java!
Tier1 app
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PDF
What companies do with Pharo (ESUG 2025)
ESUG
 
PPT
Brief History of Python by Learning Python in three hours
adanechb21
 
PPTX
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PPTX
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
Troubleshooting Virtual Threads in Java!
Tier1 app
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
What companies do with Pharo (ESUG 2025)
ESUG
 
Brief History of Python by Learning Python in three hours
adanechb21
 
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Presentation about Database and Database Administrator
abhishekchauhan86963
 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 

CouchDB Day NYC 2017: Mango

Editor's Notes

  • #9: HTTP Basic authentication is a simple way to authenticate with an HTTP server Other approaches, such as cookies and OAuth, are often used as well