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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

issue concatenating query with context in tMongoDBInput

Hi,
There is an issue in Talend 6.0.0 that seems not to appear in previous versions. We get a compile error when we concatenate a context variable in the query in MongoInput. The exact same job compiled ok in previous versions of talend.
Please see the attached screenshots and job itself. Looking at the code it seems that the query is interpreted as a regex, which is not.

0683p000009MGTB.png0683p000009MGdU.png0683p000009MGdZ.png0683p000009MGde.png
Talend.zip_20150805-2250.zip

Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi  tamax,


How did you set your schema of tMongoDBInput? Can you use a simple query (without context) in  tMongoDBInput to see if it is working well?


Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
Yes, the exact same query works if I replace the context variable by its value.
Anonymous
Not applicable
Author

Hi Sabrina, could you check on this? The job is attached to the first post.
_AnonymousUser
Specialist III
Specialist III

Hi,
Im also facing the same issue, im not able to use context variable in mongo query using tmongoinput component.
Im using the below query and trying to extract data above certain date limit
"{'_createdAt': { $gte :{$date:'"+context.incrementaldate1+"'}}}"
But im getting error like 
Type mismatch: cannot convert from String to Boolean
Anonymous
Not applicable
Author

Hi Chakravarthy,
I reported this bug already on Jira and it has been fixed by Talend team. It will be available on the next version:
https://jira.talendforge.org/browse/TBD-2964

Best regards,
Maxime