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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

MongoDB and Multi-Inserts using tMongoDBOutput

In the mongo shell, I can perform a multi-insert by passing an array of json documents to the insert method on a collection, like so:
db.foo.insert()
0683p000009MEqc.png
How can I do the same thing with a tMongoDBOutput? I am not going to iterate through a list of documents and update them one by one. I would also not want to write to a temp file and then use tMongDBBulkLoad.
I've found a current workaround with the following:

0683p000009MEnT.png
And in my tMongoDBRow:
0683p000009MErK.png
Oddly enough, I am constructing a String representation of a JSONArray, and the tMongoDBRow appears to be converting it into an actualy JSONArray. If I issued the same command in the Mongo console, it would fail with a "...attempted to save a string value.  document expected. at src/mongo/shell/collection.js:140".

How can I do this using a tMongoDBRow?
Thank you.
Labels (3)
1 Reply
Anonymous
Not applicable
Author

Try this expression on tMongoDBRow:
"db.foo.insert()"

Best regards
Shong