Four Stars

tMongoDBOutput Upsert option

Hi,

I am trying extract xml data from xml file to mongodb. The flow like below.

1.step Extract data from xml

2.step Call xmltoJson function and convert the data from xml to json(tjava)

3.step mapping(tmap) 

4.step load data into table via tMongoDBOutput component. 

I can manage to insert the data to the table at "insert" mode(pic-4). But when I only change the mode to "Upsert", it doesn't Update the same data and it creates a new row with "_id" column is NULL(pic-5).

I can set a value to "_id" column while inserting but when I try to upsert I can not manage it. It sets NULL value to "_id" column.

Another question is Talend Studio doesn't let me to change "Json Configuration Tree". It is disabled. I am using free version. Do you know why?

 

pic-1

pic1.png

pic-2

pic2.png

 

pic-3

pic3.png

 

pic-4

pic4.png

 

pic-5

pic5.png

 

Thanks for help from now.

Kind Regards.

1 REPLY
Moderator

Re: tMongoDBOutput Upsert option

Hello,

The JSON tree map will be configurable in " built-in" mode not "Repository" mode

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.