Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Bug : How to make Aggregation Pipeline Query with tMongoDBInput component ?

Hi,

I have a tMongoDBInput component, and i want to use a query type : "Aggregation Pipeline Query".

When in put a line with my request in the tab "Aggregation stages", (see code snippet below), i have lot of errors / Syntax errors. how can i solve the problem ? thanks.

 

Code MongoDB Request Snippet :

db.lines.find({$and:[{'type':{$in:['id']}},
{'processus_time':{$gte: new Date(new Date("2017-05-28T16:00:00Z").setHours(0,0,0,0)).toISOString()}},
{'processus_time':{$lte: new Date(new Date().setHours(23,59,59,999)).toISOString()}},
{'a':null}]})

Labels (2)
6 Replies
vapukov
Master II
Master II

try this:

"db.lines.find({$and:[{'type':{$in:['id']}},
{'processus_time':{$gte: new Date(new Date(\"2017-05-28T16:00:00Z\").setHours(0,0,0,0)).toISOString()}},
{'processus_time':{$lte: new Date(new Date().setHours(23,59,59,999)).toISOString()}},
{'a':null}]})"

double quotes around query and escape \ for internal quotes

Anonymous
Not applicable
Author

hi

thanks for your response. i tried this (copy paste), and i have now :

Talend Error : String literal is not properly closed by a double quote.

 

vapukov
Master II
Master II

please attach screenshot, because it work 

2 pair of eyes better than 1 😉

Anonymous
Not applicable
Author

0683p000009LuZr.png

Anonymous
Not applicable
Author

up

vapukov
Master II
Master II

what is error text?

not seen - wha component return error? not seen full text in window