cloudant

How do I add the moment.js library to Cloudant NoSQL Design Doc on Bluemix

泪湿孤枕 提交于 2019-12-11 05:32:56
问题 Just learning Cloudant NOSQL on Bluemix. I have been successful adding my weather data to the database, simple queries, and even pulling it out to a mobile app using Kinetise. I am not a SW developer,but I am an engineer. I need to access the moment.js date math capability as I believe this will help me sum weather station data over the last 24hours, 7days, and 30d relative to the current moment in time. I though this would be easy not knowing any better. Clearly you need to saddle up when

Cloudant - Connection Pooling

和自甴很熟 提交于 2019-12-11 04:57:22
问题 I am trying connection pooling with cloudant database. From what I understand, the cloudant database inherently does connection pooling with the default parameter of max_connections = 6. max_connections code. The code snippet required is at line 130. I have a working application written in scala using akka-http with the following initialisation : val client: CloudantClient = ClientBuilder.account(<accountdetails>) .username(<my user name>) .password(<my password>).maxConnections(20) .build()

How to make a Curl call in node.js with arguments

馋奶兔 提交于 2019-12-11 04:35:39
问题 I am trying to make this curl request from a node module. not sure how to pass the arguments. curl -u myusername https://myusername.cloudant.com/_api/v2/monitoring/disk_use?cluster=myclustername&format=json so far I got the following code. I am using node-libcurl in hopes that it would be easy. var Curl = require( 'node-libcurl' ); var curl = new Curl(); curl.setOpt( 'URL', 'myusername.cloudant.com/_api/v2/monitoring/disk_use?cluster=myclustername&format=json' ); curl.on( 'end', function(

Maximum size of bulk create (or update) for Cloudant?

▼魔方 西西 提交于 2019-12-11 04:08:41
问题 When using bulk operation with Cloudant. Is there a "hard" limit (size of all documents / number of documents)? Also: is there a best practice setting? (size of all documents / number of documents per request)? 回答1: I understand there is a 65Mb limit in the size of individual documents in Cloudant. Having said that, I would try to avoid getting anywhere near that size of document. A rule of thumb would be if the size of your documents is over a few tens of kilobytes, you might be better

how to connect a Java app ( java code ) to cloudant?

 ̄綄美尐妖づ 提交于 2019-12-11 02:17:38
问题 I've java code in eclipse and I've done all the set up required between eclipse and IBM bluemix cloudant service I am not sure how to update my code to enable cloudant in eclipse can someone please help ? 回答1: you need to add a piece of code in CloudantClient.java file under source directory of your project. Please add these lines in CloudantClient class: String VCAP_SERVICES = System.getenv("VCAP_SERVICES"); JSONObject vcap; vcap = (JSONObject) JSONObject.parse(VCAP_SERVICES); cloudant =

IBM mobile app builder does not see documents in Cloudant database, why?

落花浮王杯 提交于 2019-12-10 23:49:28
问题 I followed the steps in this link Questions and it worked for the connection to the cloudant database. But the " Mobile App Builder " says: there are no documents, but there are over 2000 documents. What is wrong with my configuration? Regards, Thomas 回答1: Mobile App Builder does not support nested objects at the time. The documents in your database contain one nested object. At this time, you could put all the fields in the first level of JSON (date, time, image, etc.), and it should work.

PouchDB on Cloudant

巧了我就是萌 提交于 2019-12-10 22:25:43
问题 I am currently using PouchDB and I am making use of Cloudant to make my db in PouchDB to be on cloud. I did callback method and it gave a success callback, however, I check my database on Cloudant, there's 0 doc created but there's 8 update seq. May I know why? This is my set of code I used. function pouchdb() { var db = new PouchDB("todos"); var remoteDB = new PouchDB("http://example.cloudant.com/example"); var todo = { _id: "mittens1233", title: "hello", occupation: "kitten123" }; db.put

Connecting IBM mobile app builder to Cloudant JSON data - bluemix-mobile-services

风格不统一 提交于 2019-12-10 22:16:05
问题 I am using the IBM Bluemix Mobile App Builder tool and understand that it is currently experimental, but I have been having problems connecting the tool to an existing JSON data source. I have tried connecting to the Cloudant instance within Bluemix, but can't find a way to bind the App Builder tool to the Cloudant DB within Bluemix. I see "Mobile App Builder-6v is not currently authorized to access other service instances. I also tried using the credentials inside Bluemix to get to the JSON

cloudant index: count number of unique users per time period

人走茶凉 提交于 2019-12-10 22:12:13
问题 A very similar post was made about this issue here. In cloudant, I have a document structure storing when users access an application, that looks like the following: {"username":"one","timestamp":"2015-10-07T15:04:46Z"} ---| same day {"username":"one","timestamp":"2015-10-07T19:22:00Z"} ---^ {"username":"one","timestamp":"2015-10-25T04:22:00Z"} {"username":"two","timestamp":"2015-10-07T19:22:00Z"} What I want to know is to count the # of unique users for a given time period. Ex: 2015-10-07 =

count number of rows in cloudant in response

梦想的初衷 提交于 2019-12-10 12:17:11
问题 I have below response from my map reduce . Now i want to count the number of rows in the response can any one help me how i can do it in cloudant? I need something in response like to get the total count of distinct correlationid in a period. { rows: [ { key: [ "201705", "aws-60826346-" ], value: null }, { key: [ "201705", "aws-60826348802-" ], value: null }, { key: [ "201705", "aws-las97628elb" ], value: null }, { key: [ "201705", "aws-ve-test" ], value: null }, { key: [ "201705", "aws