<?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 Re: How to change the structure when converting from CSV file to json file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207209#M6945</link>
    <description>&lt;P&gt;You are missing the "Group By" settings in tWriteJSONField_2.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2019 09:32:07 GMT</pubDate>
    <dc:creator>JR1</dc:creator>
    <dc:date>2019-08-23T09:32:07Z</dc:date>
    <item>
      <title>How to change the structure when converting from CSV file to json file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207202#M6938</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am creating on converting CSV file to JSON file job.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My CSV Format:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Product,Price,Quantity
"ABC",100,10
"DEF",200,20&lt;/PRE&gt; 
&lt;P&gt;Json file format I need:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;{
    "app" : 1,
    "records" : [  
            {
                "Product" : { "value" : "ABC"},
                "Price" : { "value" : 100},
                "Quantity" : { "value" : 10}    
            },
            {
                "Product" : { "value" : "DEF"},
                "Price" : { "value" : 200},
                "Quantity" : { "value" : 20}    
            }
    ]
}&lt;/PRE&gt; 
&lt;P&gt;I have completed this:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;{
    "records" : [  
            {
                "Product" : "ABC",
                "Price" :  100,
                "Quantity" : 10    
            },
            {
                "Product" : "DEF",
                "Price" : 200,
                "Quantity" : 20    
            }
    ]
}&lt;/PRE&gt; 
&lt;P&gt;How can I add an "app" property to the route and include "value" property?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The “1” property data can be a static value.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My job setting (sorry, it's not the English version.):&lt;/P&gt; 
&lt;P&gt;All schemas are built-in and default settings.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-21 234914.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M76R.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155115iF658C36536D56DC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M76R.png" alt="0683p000009M76R.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-21 234941.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M76W.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140470i1DCF47A90820CDE4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M76W.png" alt="0683p000009M76W.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:54:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207202#M6938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the structure when converting from CSV file to json file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207203#M6939</link>
      <description>&lt;P&gt;OK, Let's do this. You can achieve this by doing it in two stages.&lt;/P&gt; 
&lt;P&gt;Build a job that looks like the one below. In the first tWriteJSONField you create a JSON object for each row (pay attention to all the settings!).&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 965px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M775.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152380i29D62FEA1290451F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M775.jpg" alt="0683p000009M775.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;In a tMap you simply add a new column called "app" and map the output of the previous step to a column called "records".&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 930px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M77F.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139038i0CABF883976500E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M77F.jpg" alt="0683p000009M77F.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Then move the output into another tWriteJSONField component and configure it as follows (the output has just one column named "content"):&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.jpg" style="width: 950px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6uq.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151159i0103B542A5FBBAA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6uq.jpg" alt="0683p000009M6uq.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Finally, store your output in a file (or do whatever you want to do with it.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.jpg" style="width: 988px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M77K.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150868i7A5C73A827396950/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M77K.jpg" alt="0683p000009M77K.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When I put the following input into the tFixedFlowInput (Product is a String, Price is an Integer, Quantity is an Integer - of course you could also use a CSV file as input)&lt;/P&gt; 
&lt;PRE&gt;Product,Price,Quantity
"ABC",100,10
"DEF",200,20&lt;/PRE&gt; 
&lt;P&gt;I get the following output&lt;/P&gt; 
&lt;PRE&gt;{"app":1,"records":[{"product":{"value":"ABC"},"price":{"value":100},"quantity":{"value":10}},{"product":{"value":"DEF"},"price":{"value":200},"quantity":{"value":20}}]}&lt;/PRE&gt; 
&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 19:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207203#M6939</guid>
      <dc:creator>JR1</dc:creator>
      <dc:date>2019-08-21T19:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the structure when converting from CSV file to json file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207204#M6940</link>
      <description>&lt;P&gt;Thanks for reply.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried it.&lt;/P&gt; 
&lt;P&gt;But, "Output Column" is empty.&lt;/P&gt; 
&lt;P&gt;Is something wrong?&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 135331.png" style="width: 855px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M78I.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143058i4C2061D8294C00DD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M78I.png" alt="0683p000009M78I.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tFixedFlowInput settings:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 135445.png" style="width: 735px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M78N.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128935iDA8D43D79C0B8366/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M78N.png" alt="0683p000009M78N.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tFixedFlowInput schema settings:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 135509.png" style="width: 762px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6ur.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148820i65468FAB0483FCE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6ur.png" alt="0683p000009M6ur.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Result of confirming tFixedFlowInput output with tLogRow(Table mode):&lt;/P&gt; 
&lt;PRE&gt;[statistics] connecting to socket on port 3712
[statistics] connected
.--------+-----+--------.
|       tLogRow_1       |
|=-------+-----+-------=|
|Product |Price|Quantity|
|=-------+-----+-------=|
|Product1|100  |10      |
|Product2|200  |20      |
'--------+-----+--------'

[statistics] disconnected&lt;/PRE&gt; 
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 06:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207204#M6940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T06:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the structure when converting from CSV file to json file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207205#M6941</link>
      <description>&lt;P&gt;Click on "Edit Schema" in tWriteJSONField and add the missing output column on the right side?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 06:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207205#M6941</guid>
      <dc:creator>JR1</dc:creator>
      <dc:date>2019-08-23T06:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the structure when converting from CSV file to json file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207206#M6942</link>
      <description>&lt;P&gt;Oh, I did not...&lt;/P&gt; 
&lt;P&gt;I set it like this now:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 143448.png" style="width: 527px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M78J.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155409iDCF851454C5BA7B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M78J.png" alt="0683p000009M78J.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Then, three items will be displayed.&lt;BR /&gt;How do I display content only?&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 143538.png" style="width: 570px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6g4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129294iCE10797BE9236406/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6g4.png" alt="0683p000009M6g4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 06:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207206#M6942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T06:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the structure when converting from CSV file to json file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207207#M6943</link>
      <description>&lt;P&gt;You will have to remove the three columns just from the right side of the schema and just add a single column there (e.g. "content"). Do not use the arrows in the middle to move columns between the schemas.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 07:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207207#M6943</guid>
      <dc:creator>JR1</dc:creator>
      <dc:date>2019-08-23T07:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the structure when converting from CSV file to json file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207208#M6944</link>
      <description>&lt;P&gt;Thank you very much.&lt;BR /&gt;It is almost completed, but I want you to help at the end.&lt;/P&gt; 
&lt;P&gt;When setting to your answers, the final output looks like this.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;{"app":1,"records":{"Product":{"value":"Product1"},"Price":{"value":100},"Quantity":{"value":10}}}
{"app":1,"records":{"Product":{"value":"Product2"},"Price":{"value":200},"Quantity":{"value":20}}}&lt;/PRE&gt; 
&lt;P&gt;I've checked your screenshots many times, but I don't know what's wrong.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tMap mapping:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 161525.png" style="width: 602px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M78X.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132476iEF66F5F62F9887F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M78X.png" alt="0683p000009M78X.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tMap component setting:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 161646.png" style="width: 559px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M78c.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131833i839EC3609329208A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M78c.png" alt="0683p000009M78c.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tWriteJSONField2 schema setting:&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="コメント 2019-08-23 161743.png" style="width: 632px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6jD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127995i5A4BE0FF22765F58/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6jD.png" alt="0683p000009M6jD.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tWriteJSONField2 setting:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 161937.png" style="width: 853px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M78m.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153031i3EEEC9792E86CF9A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M78m.png" alt="0683p000009M78m.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tWriteJSONField2 JSON tree setting:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="コメント 2019-08-23 162121_3.png" style="width: 807px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M78r.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135612i8217207405D2A95F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M78r.png" alt="0683p000009M78r.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 08:24:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207208#M6944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T08:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the structure when converting from CSV file to json file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207209#M6945</link>
      <description>&lt;P&gt;You are missing the "Group By" settings in tWriteJSONField_2.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 09:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-change-the-structure-when-converting-from-CSV-file-to/m-p/2207209#M6945</guid>
      <dc:creator>JR1</dc:creator>
      <dc:date>2019-08-23T09:32:07Z</dc:date>
    </item>
  </channel>
</rss>

