There may be an obvious answer to this question, but I cannot find it anywhere: what is the best way to query couchdb databases stored on servers with a cloud platform? I am trying to use temporary views as well as couchdb.py instructions:
>>> db['johndoe'] = dict(type='Person', name='John Doe') >>> db['maryjane'] = dict(type='Person', name='Mary Jane') >>> db['gotham'] = dict(type='City', name='Gotham City') >>> map_fun = '''function(doc) { ... if (doc.type == 'Person') ... emit(doc.name, null); ... }''' >>> for row in db.query(map_fun): ... print row.key John Doe Mary Jane
While this works on locally hosted databases, CloudAnt returns an error:
couchdb.http.ServerError: (403, ('forbidden', 'temp views are disabled on Cloudant'))
I read the cloud tutorial on demand, but the proposed query syntax seems awkward, and it's not clear how to use it in python! Is there an easy way around this?
source share