tWriteJSONField how to all in one datas

Four Stars

tWriteJSONField how to all in one datas

Hi guys,

 

I'm trying to do exactly the same thing as the option "all-in-one" on tXMLMap for document (xml) response  but on the component tWriteJSONField, with JSON format.

My purpose is to groupe all objects JSON into one row and not into the same number of objects.

 

Please, it's being a long time now that i cant figure it out.

 

Matthieu


Accepted Solutions
Community Manager

Re: tWriteJSONField how to all in one datas

Hi
Add a new column and set a constant before tWriteJSONField, this column will be the group element on tWriteJSONField component.

Regards
Shong

----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: tWriteJSONField how to all in one datas

Hi
Add a new column and set a constant before tWriteJSONField, this column will be the group element on tWriteJSONField component.

Regards
Shong

----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: tWriteJSONField how to all in one datas

Hi Shong,

 

You can't imagine how much you helped me !

Thanks this works easily great. I added a column  in the tMap just before the tWriteJSONField, with a constant value ( "test" )and then added to the group by section of the tWriteJSONField as input.

 

Thanks !

 

Matthieu DELMAS

Community Manager

Re: tWriteJSONField how to all in one datas

Great, thanks for your positive feedback! 

----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: tWriteJSONField how to all in one datas

I want to add my thanks here too because I spent over a day trying to solve this without having to resort to custom Java code.

 

To be honest, the tWriteJSONField component should not force you to do this.  Many of us want to do exactly the same thing, take a lot of rows from an output and stuff them into a JSON array, without regard for grouping.  I tried a large number of permutations of JSON tree configurations, and none worked.