<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Converting a normalized CSV to complex JSON Object in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Converting-a-normalized-CSV-to-complex-JSON-Object/m-p/2349633#M116593</link>
    <description>Hi, 
&lt;BR /&gt;i searched quite a bit but did not find any solution. I'm facing the issue that i have a normalized CSV File which is exploded in all relations. Out of that file i try to reconstruct some relations and build a complex json object.&amp;nbsp; 
&lt;BR /&gt;As an example it is a structure similar to a picture metainformation with persons and tags. The csv would look similar to the following lines 
&lt;BR /&gt;Picture name;Person;Tag 
&lt;BR /&gt;pic1;PersonA;sea 
&lt;BR /&gt;pic1;PersonB;sea 
&lt;BR /&gt;pic1;PersonA;sun 
&lt;BR /&gt;pic1;PersonB;sun 
&lt;BR /&gt;pic2;PersonC;bird 
&lt;BR /&gt;pic3;PersonA;bird 
&lt;BR /&gt;pic3;PersonC;bird 
&lt;BR /&gt;I would like to build up the folowing JSON Object from that kind of data (not sure if it is completely valid but should be sufficient to get the idea): 
&lt;BR /&gt;"pictures": , 
&lt;BR /&gt;"tags": 
&lt;BR /&gt;} 
&lt;BR /&gt;}, 
&lt;BR /&gt;"picture": { 
&lt;BR /&gt;"name": "pic2", 
&lt;BR /&gt;"persons": , 
&lt;BR /&gt;"tags": 
&lt;BR /&gt;} 
&lt;BR /&gt;}, 
&lt;BR /&gt;"picture": { 
&lt;BR /&gt;"name": "pic3", 
&lt;BR /&gt;"persons": , 
&lt;BR /&gt;"tags": 
&lt;BR /&gt;} 
&lt;BR /&gt;}] 
&lt;BR /&gt; 
&lt;BR /&gt;Does anybody have an idea on how to solve that? It seems not doable through the WriteJSONField directly. I'm pretty open to the suggestions and ideas. The only thing i have almost no influence on is the incoming csv file. So for myself starting point is the csv i provided.&amp;nbsp; 
&lt;BR /&gt;Regards and thx in advance 
&lt;BR /&gt;COnstantin</description>
    <pubDate>Sat, 16 Nov 2024 11:28:14 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2024-11-16T11:28:14Z</dc:date>
    <item>
      <title>Converting a normalized CSV to complex JSON Object</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-a-normalized-CSV-to-complex-JSON-Object/m-p/2349633#M116593</link>
      <description>Hi, 
&lt;BR /&gt;i searched quite a bit but did not find any solution. I'm facing the issue that i have a normalized CSV File which is exploded in all relations. Out of that file i try to reconstruct some relations and build a complex json object.&amp;nbsp; 
&lt;BR /&gt;As an example it is a structure similar to a picture metainformation with persons and tags. The csv would look similar to the following lines 
&lt;BR /&gt;Picture name;Person;Tag 
&lt;BR /&gt;pic1;PersonA;sea 
&lt;BR /&gt;pic1;PersonB;sea 
&lt;BR /&gt;pic1;PersonA;sun 
&lt;BR /&gt;pic1;PersonB;sun 
&lt;BR /&gt;pic2;PersonC;bird 
&lt;BR /&gt;pic3;PersonA;bird 
&lt;BR /&gt;pic3;PersonC;bird 
&lt;BR /&gt;I would like to build up the folowing JSON Object from that kind of data (not sure if it is completely valid but should be sufficient to get the idea): 
&lt;BR /&gt;"pictures": , 
&lt;BR /&gt;"tags": 
&lt;BR /&gt;} 
&lt;BR /&gt;}, 
&lt;BR /&gt;"picture": { 
&lt;BR /&gt;"name": "pic2", 
&lt;BR /&gt;"persons": , 
&lt;BR /&gt;"tags": 
&lt;BR /&gt;} 
&lt;BR /&gt;}, 
&lt;BR /&gt;"picture": { 
&lt;BR /&gt;"name": "pic3", 
&lt;BR /&gt;"persons": , 
&lt;BR /&gt;"tags": 
&lt;BR /&gt;} 
&lt;BR /&gt;}] 
&lt;BR /&gt; 
&lt;BR /&gt;Does anybody have an idea on how to solve that? It seems not doable through the WriteJSONField directly. I'm pretty open to the suggestions and ideas. The only thing i have almost no influence on is the incoming csv file. So for myself starting point is the csv i provided.&amp;nbsp; 
&lt;BR /&gt;Regards and thx in advance 
&lt;BR /&gt;COnstantin</description>
      <pubDate>Sat, 16 Nov 2024 11:28:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-a-normalized-CSV-to-complex-JSON-Object/m-p/2349633#M116593</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T11:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Converting a normalized CSV to complex JSON Object</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-a-normalized-CSV-to-complex-JSON-Object/m-p/2349634#M116594</link>
      <description>Hi&amp;nbsp;
&lt;BR /&gt;It is impossible to generate this json object with tWriteJsonField, because&amp;nbsp;
&lt;FONT size="2"&gt;tWriteJsonField don't allow to define multiple loop elements, this json object has two loop elements: person and tag.&lt;/FONT&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 04 Nov 2014 07:16:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-a-normalized-CSV-to-complex-JSON-Object/m-p/2349634#M116594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T07:16:51Z</dc:date>
    </item>
  </channel>
</rss>

