Category Archives: MongoDB

esProc Helps Process Heterogeneous DataSources in Java – MongoDB

MongoDB does not support join directly.The unity JDBC recommended by the official website can perform the join operation after retrieving data out. But the advanced functions, like join, group, functions and expressions, are only provided by the paid version of … Continue reading

Posted in esProc/R/Python/Perl, Java Assistant, MongoDB | Leave a comment

esProc Helps with Computation in MongoDB – Subquery

MongoDB doesn’t support the complex subquery which can only be realized by retrieving the data out first and then performing further computation. The operation is the same complex even if Java or other programming languages are used to write the … Continue reading

Posted in MongoDB | Tagged , , , | Leave a comment

Query List Fields in MongoDB Subdocuments in esProc

Problem source:https://groups.google.com/forum/#!msg/mongodb-user/HqzXSh5DZek/ffZG0TQ1w8cJ . Collection Cbetween contains cascaded subdocuments, in which the List-type dataList field includes a series of strings, each of which has multiple numbers. You need to find strings according to the criterion that the first number is greater than … Continue reading

Posted in MongoDB, SQL-related Puzzle | Leave a comment

Merge MongoDB Documents in esProc

Problem source:https://groups.google.com/forum/#!topic/mongodb-user/BpgEaRqrKsA . Below is a selection of Collection C1: { “_id” : ObjectId(“55014006e4b0333c9531043e”), “acls” : { “append” : { “users” : [ObjectId(“54f5bfb0336a15084785c393”) ], “groups” : [ ] }, “edit” : { “groups” : [ ], “users” : [ ObjectId(“54f5bfb0336a15084785c392”) ] … Continue reading

Posted in MongoDB, SQL-related Puzzle | Tagged , , | Leave a comment

esProc Implements Foreign Key Relationship for MongoDB Collections

Problem source:http://stackoverflow.com/questions/29392169/populating-field-values-for-referred-documents-in-aggregate-call-in-mongoose . With MongoDB’s built-in API, you implement a foreign key relationship through hardcoding. The hardcode is not intuitive and difficult to write. In this case you can use esProc to handle this. For example: Collection UserCourseProgres records the … Continue reading

Posted in MongoDB, SQL-related Puzzle | Leave a comment

esProc Exports Unstructured MongoDB Data as CSV Files

Problem source:https://plus.google.com/+VicNgrail/posts/ebS9JUtFopw . MongoDB allows storing unstructured data in it. But it is somewhat difficult to export the data as standard structured data. esProc, however, makes it an easy job, with MongoDB’s cooperation. Let’s look at the steps for doing … Continue reading

Posted in MongoDB, SQL-related Puzzle | Tagged , , , | Leave a comment

Group MongoDB Collection and Find Top N members in esProc

Problem source:https://groups.google.com/forum/#!topic/mongodb-user/Rjv6lyUCe1s . Collection last3 has two fields: variable and timestamp. You need to first group documents by variable and find from each group the top 3 ones with the latest timestamp, and then find from the three documents the … Continue reading

Posted in MongoDB, SQL-related Puzzle | Tagged , , , , | Leave a comment