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

how to update data in Mongodb Collection?

Hello all,

 

I have simple case, just read data in a Mongodb collection and update a data field and then save back to the same collection.

I use tMongodbInput to get data, and then use tMap to revise the value, and finally, I use tMongodbOutput which config to the same collection.... but it not work.

Could you share me how to do it?

0683p000009M8Rb.png

Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hello all,

Anybody help?

Even it run successfull but there is nothing changed in the Collection.

It seem not working for Update, Delete

Just work fine for insert, upsert...

I have set the _id as Key and change the data type to Object already, but still not work

I also see that when I change from Update to Upsert, but this way create another document instead of update 

 

Anonymous
Not applicable
Author

Hello all,

I found it, just an weird requirement from MongoDB syntax, let it here for other to refference

 

The problem here is cause by using Object ID (which is auto generated by Mongodb when you insert new document into the database). Just try to avoid using it as you key, but if you really want to use, please add ObjectID('[your document id here]').

That is all the story which take me out more than 1 week.

0683p000009M9IR.png