Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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

Regards
Shong

View solution in original post

5 Replies
Anonymous
Not applicable
Author

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

Regards
Shong

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Great, thanks for your positive feedback! 

Anonymous
Not applicable
Author

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.

EV89
Contributor III
Contributor III

A question @Shicong Hong​ , but if i need only the grouped column how removed the fixed column after have grouped?

 

thanks for your help