One Star

tMongoDB in UPSERT mode.. how to do ?

I'm trying to use the tMongoDBoutput for a Json file injection.
This is my schema

In the INSERT mode, there is no problem : i found all my data with the
> db.myCollection.find()
In the UPSERT mode, the component doesn't send me any error but nothing is inserted in the collection... what was wrong ?
Any idea ?


Re: tMongoDB in UPSERT mode.. how to do ?

Have you checked out " Die on error" option to see if there is any error printed on console?
Best regards
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tMongoDB in UPSERT mode.. how to do ?

hi (sorry for this late answer due to vacation).
Effectively, i see this error
Exception in component tMongoDBOutput_1
java.lang.Exception: Must have at least one key in schema
    at etl_cres.jsonloader_0_1.jsonLoader.tFileList_1Process(
    at etl_cres.jsonloader_0_1.jsonLoader.tMongoDBConnection_1Process(
    at etl_cres.jsonloader_0_1.jsonLoader.runJobInTOS(
    at etl_cres.jsonloader_0_1.jsonLoader.main(

How can i introduce a key in schema as i load files and the only field i have is a single field named "content" for Talend ?