Quantcast
Channel: KNIME RSS
Viewing all articles
Browse latest Browse all 4157

Mongo node: problem querying for dates with jongo

$
0
0

I need to query some information from Mongo based on a date and and timestamp. I have been using the mongo node for a while always for simpler queries like {a:10}, e.g. For the  docs i need to retrieve the console query would be something similar to:

 db.audio.find({'d':{"$gt": new Date("01/11/2017")}})

After reading the jongo documentation and google, it seems that the way of querying for dates in jongo is something like this, using templates:

collection.find("{date: {$lt : #}}", new Date(2012, 11, 30));

However, anytime that i try this or any variation into knime query box:

"{date: {$lt : #}}", new Date(2012, 11, 30) 

I got this error: 

Not enough parameters passed to query.

And if i even try the jongo documentation examples, like  "{name:#, age:#}", "Joe", 18 i got the same error, just like templates are not supported.

Can anyone point me into the right direction  with a couple of working examples to directly put into the Mongo node query field, of working with dates (selecting all documents in a range of dates or before/after a date)?

Thanks very much

Emilio

 

 


Viewing all articles
Browse latest Browse all 4157

Trending Articles