2018-10-22         Miriam

Kafka vs. MongoDB for time series data

I'm contemplating on whether to use MongoDB or Kafka for a time series dataset.At first sight obviously it makes sense to use Kafka since that's what it's built for. But I would also like some flexibility in querying, etc.Which brought me to question: "Why not just use MongoDB to store the timestamped data and index them by timestamp?"Naively thinking, this feels like it has the similar benefit of Kafka (in that it's indexed by time offset) but has more flexibility. But then again, I'm sure there are plenty of reasons why people use Kafka instead of MongoDB for this type of...

 mongodb                     2 answers                     63 view
 2018-10-22         Atwood

MongoDB Force Update

I am working on an application that uses Debezium to stream changes from MongoDB to a Kafka cluster. tl;dr - debezium tails the mongo oplog for changes to a document and stores the entire doc on kafka as json. We have a bunch of older, stale data on production that we would still like to persist on Kafka as-is. In order for the documents to be picked up by Debezium they first have to appear in the OpLog. Essentially, we need to touch every document in our production mongo replset without changing any of the data on the document. My original thought was to update a field wit...

 mongodb                     1 answers                     11 view
 2018-10-22         Colby

Relationship field within same collection?

I have a keystonejs model for product categories (MongoDB). Some categories should have subcategories. Currently I have set a relationship field "ChildCategoryOf", where I can manually select the Parent Category in admin panel. To have more functionality, I would like to create another Field called "ParentCategoryOf" that would consist an Array of subcategories. How is it possible to have a field that automatically stores Child categories in Array? I imagine it like this:Current model:let ProductCategory = new keystone.List('ProductCategory', { autokey: { from: 'n...

 mongodb                     1 answers                     10 view
 2018-10-22         Beau

Is TSDB needed for vehicle tracking?

In my application, all I want to track is the location of the vehicle in terms of lat and lon. In such a case, I will need to know the path that a vehicle has taken for a certain trip or the movement of the vehicle on a certain day. Do I need to consider a time-series DB for this or can I just use a one-event-one-document mongoDB approach?YG You just need to record (vehicule_id, date, lat, long). Any database system will do that. You do not need a TimeSerie DB for that, although nothing forbids you to do so.If you need a specific mongoDB response, please tag it as mongod...

 mongodb                     1 answers                     51 view
 2018-10-22         Celeste

Mongodb Vs Azure Documentdb which is better and why

I am going to use mongodb, but being a .net developer I am looking into Azure Documentdb. I want to know. Anyone is really using Azure Documentdb on production. Is azure Documentbd is as good as in performance as mongodb. TIA. Anyone is really using Azure Documentdb on production. R: Microsoft is using on MSN portal and One Note. Is azure Documentbd is as good as in performance as mongodb. Yes, it is.Mongo is more mature, but Azure DocumentDB is always being improved. I suppose that you are going to host your app on Azure, so I would go with Azure Doc...

 mongodb                     1 answers                     32 view
 2018-10-22         Samantha

How to verify the integrity of the files that result from a mongodump operation?

From the research I have done, mongodump doesn't have a built-in check to verify the integrity of a mongodump operation; at least, nothing apparent to the user. I may be wrong. If I am, please inform me. Otherwise, I'm sure I'm not the only one who wishes to verify their mongodump operation copied the data without any corruption or loss. What are the various methods others have used to insure the integrity of their mongodump files? If the method for doing so is inherently different on a sharded cluster, please answer how to do so on a single MongoDB instance and one that is...

 mongodb                     1 answers                     15 view
 2018-10-22         Agatha

Ensuring unique index on a sharded Mongo collection

I have sharded my mongo collection with the ObjectId field '_id' as the shard key.My need is to ensure an unique index on this collection.Unfortunately, you can't create unique indexes on a sharded Collection.MongoDB suggests : Use a secondary collection to enforce uniqueness. docsBut there can always be consistency issues defeating this method as mongoDB doesn't support transactions.For example,We have collections Sample and Sample_proxy (Index collection). Sample is sharded while Sample_proxy is not. So an unique index can be created on Sample_proxy.Before inserting int...

 mongodb                     1 answers                     19 view
 2018-10-22         Suzanne

Mongodb Hashed Sharding

If I choose {a:1,b:1,c:1} as my shard key and in my query I filter {a:1} in a hashed sharding strategy , is the query a targeted operation or it is broadcasting to every shard in the cluster?If it is targeted operation how mongodb determine it? as hash of {a:1} is completely differ from hash of {a:1,b:1,c:1} The simple answear is: Yes.Look at it this way:Let's assume you have got the following collection: //1 { a: 1, b: 1, c: 1, d: 1 }, //2 { a: 1, b: 1, c: 1, d: 2 }, //3 { a: 1, b: 1, c: 2, ...

 mongodb                     1 answers                     20 view
 2018-10-22         Natalie

MongoDB 'This node was not started with the replSet option

First of all I know this has the same title as mine, but in my case it's not the wrong port.I want to setup sharding on my local machine I start with the following command:mongod --shardsvr --replSet rs1 --port 27017 --dbpath D:\mongo\data1\dbThen do the following:mongo --port 27017rs.initiate({_id : "rs1", version: 1, members: [ {_id : 0, "host" : "localhost:27017"} ] })I'm still getting the following:{ "ok" : 0, "errmsg" : "This node was not started with the replSet option", "code" : 76, "codeName" : "NoReplicationEnabled"}I already tried by ch...

 mongodb                     1 answers                     28 view
 2018-10-22         Dominic

mongoDB count distinct objects after aggregate of 3 collections

MongoShell version 4.0.2I have 3 collections with data correlation between collections B: { "_id" : ObjectId("5b8f83fb520b3ea906ac11d1"), "X" : "002100367752", "Z" : "002KV180054605",} A : { "_id" : ObjectId("5b8f83fa520b3e09e7ac0de1"), "Y" : "002100367752" }C : { "_id" : ObjectId("5b8f83fb520b3e0127ac15b9"), "N" : "002KV180054605", "Q" : 17, "W" : 1, "E" : 35 }The connection looks like this:Collection A <> Collection B <> Collection COnly in Collection B I have ID of objects from all 3 collectionsNow, I want to count the ...

 mongodb                     1 answers                     83 view
 2018-10-22         Letitia

Error: mongodb.jdbc.MongoDriver not loaded. Are you sure you've included the correct jdbc driver

I have to import mongoDB data into an elastic search, so I used the given conf with logstash:input{ jdbc{ jdbc_driver_library => "D:/mongodb_unityjdbc_full.jar" jdbc_driver_class => "mongodb.jdbc.MongoDriver" jdbc_connection_string => "jdbc:mongodb://10.10.20.125:27017" jdbc_user => "" statement => "SELECT * FROM collection_name.documentname" }}output { elasticsearch { hosts => 'http://localhost:9200' index => 'person_data' document_type => "person_data" } stdout { codec => rubydebug }}But I rece...

 mongodb                     2 answers                     86 view
 2018-10-22         Catherine

How to get records based on time?

I am new to MongoDb and would appreciate some help with this query. I wrote the following aggregation pipeline. I wrote a query which returns last 24 hours records after that I am getting (00:01) hour to (05:00) hour records. With this how can I get records between (20:00) hour and (23:59) hours. Anyone, please suggest me.db.collection.aggregate([ {$match: {createDate: {$gte: new Date(new Date(ISODate().getTime() - 1000*60*60*24))}}}, { $project: { hour: { $hour: "$createDate" }, minutes: { $minute: "$createDate" }, } }, { $match: { $an...

 mongodb                     1 answers                     86 view
 2018-10-22         Marcia

How to pipeline for document

I have collection with documents like this:{ "_id" : ObjectId("5b91035eca4f00000124e1d8"), "status" : 0, "date" : NumberLong(0), "players" : [ { "name" : "Valentin", "sets" : [ { "points" : [ { "score" : 0, "comment" : "" }, { "score" : 0, "comment" : "" }, { "score" : 0, "comment" : "" }, { "score" : 1, "comment" : "sa" }, { "score" : 1, "comment" : "" }, { "score" : 1, "comment" : "" }, { "score" : 1, "comment" : "" }, { "score" : 1, "comment" : "" }, { "score" : 1, "comment" : "" }, { "score" : 1, "comment" : "" }, { "score" : 2, "comment" : "" }, { "score" : 2, "comment...

 mongodb                     2 answers                     86 view
 2018-10-22         Bernice

Is any application for MongoDB browser in ubuntu 16.04 32 bit processor

I trying to install Mongo DB browser for Ubuntu 16.04 32 bit version but none of application installing to the machine If you are talking about robo3t, you can download the .tar.gz file for Linux (https://robomongo.org/download), unpack it and run the bin/robo3t executable.You don't even need to install it. [XXX]

 mongodb                     1 answers                     88 view
 2018-10-22         Vanessa

MongoDB group by count based on condition

I have the below mongo DB schema: { "_id" : "5b76c3c037548390fdb5b40e", "userId" : "4601", "modified" : ISODate("2018-08-21T19:13:43.301+05:30"), "rStatus" : "started",},{ "_id" : "5b76c3c037548390fdb5b40e", "userId" : "13", "modified" : ISODate("2018-08-21T19:13:43.301+05:30"), "rStatus" : "completed",},........There is a need to get data group by modified date and count of rStatus field, eg{ modified:"2018-08-21", count :{"completed":1,"ongoing":4}},{ modified:"2018-07-23", count :{"completed":2,"ongoing":5}},I am using $group but its c...

 mongodb                     2 answers                     90 view
 2018-10-22         Fabian

MongoDB $switch aggregagation always falling in default case

I have the following Mongo (simplified) aggregation :db.getCollection('oees').aggregate([{ $match: {"$or":[ {"$and":[{"resId": ObjectId("568b9eb32847fe2000e0b071")},{"attachment":"turbine1"},{"date":{"$gte":ISODate("2018-04-01T00:00:00.000Z"),"$lte":ISODate("2018-06-30T00:00:00.000Z")}}]} {"$and":[{"resId": ObjectId("...")},{"attachment":"..."},{"date":{"$gte":ISODate("..."),"$lte":ISODate("...")}}]}]}}, { $group: { _id: { date: { $dateToString: { format: '‌%Y-%m', date: '$date' } }, resId: '$resId', attachment: '$attachment' }, } }, { $project: { ...

 mongodb                     2 answers                     93 view

Page 1 of 279  |  Show More Pages:  Top Prev Next Last