Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I know in mongo I can use a set clause to update document fields based on their value.
Basically, I need to update all documents in a collection where their date field is null and set their date field to the current date. If their date field is not null then they should not be updated.
I cannot figure out how to do this in Talend.
Any ideas? Thank you!
Hello @Mark Lammert ,
Unfortunately, it's impossible to update documents using where /set clause.
However, for your case, you can use tMap to setup a filter for the input rows and use tMongoDBOutput with Action on Data=Update to update the documents like the below
Best regards
Aiming
Hello @Mark Lammert ,
Unfortunately, it's impossible to update documents using where /set clause.
However, for your case, you can use tMap to setup a filter for the input rows and use tMongoDBOutput with Action on Data=Update to update the documents like the below
Best regards
Aiming
Thank you. Did not know you could do this. Thank you for sharing.
Man, it would be awesome if you could write set and update JSON just like you can write find query JSON.
Thank you!