I have a job in which I get documents from a collection with their _id (ObjectId), and I wish to realise a SET action on the collection with this _id as a key.
I try to use the Object field type for the _id field, but the set action doesn't work, and then I try upsert with set, it create me a new document with the same _id, but Integer format.
How can I do to declare the _id as ObjectId in my query ?
I try the solution proposed in the help page of the "tWriteJSONField" : "For an object element, you need to add an attribute named class and set its static value to object". But it doesn't work, neither with object nor ObjectId.
When you fetch the documents, "_id" is coming as type string not ObjectId. So while upserting documents it will add a new docoument instead of updating existing one as
_id(str) != _id(ObjectId).
I tried to find solutions, but talend doesn't have any datatype as ObjectID. I hope they bring this datatype in future versions.
I upsert documents on some composite keys (not objectID) defined in query node in xml tree.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema