<?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 Merge two strings from a Json loop into one in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-strings-from-a-Json-loop-into-one/m-p/2366729#M130183</link>
    <description>&lt;P&gt;I am trying to merge two strings from a Json loop into one. I have the following components in play at present.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tFileInputJson--&amp;gt;tMap--&amp;gt;tFileOutputDelimited.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My input json document looks like&lt;/P&gt; 
&lt;P&gt;{&lt;BR /&gt;"columns": {&lt;BR /&gt;"source": "config",&lt;BR /&gt;"column_details": [{&lt;BR /&gt;"columnname": "col2",&lt;BR /&gt;"datatype": "float"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"columnname": "col3",&lt;BR /&gt;"datatype": "integer"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I would like to create a string in &lt;SPAN&gt;tFileOutputDelimited as&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;"The result set is&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;convert col2 to float&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;convert col3 to integer"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;However due to the loop XPath query parameter being set to "/columns/column_details" in tFileInputJson and creating the string in tMap with columnname and datatype. I get the following output&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The result set is&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;convert col2 to float&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The result set is&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;convert col3 to integer&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Any help is appreciated. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jul 2018 18:30:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-07-23T18:30:46Z</dc:date>
    <item>
      <title>Merge two strings from a Json loop into one</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-strings-from-a-Json-loop-into-one/m-p/2366729#M130183</link>
      <description>&lt;P&gt;I am trying to merge two strings from a Json loop into one. I have the following components in play at present.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tFileInputJson--&amp;gt;tMap--&amp;gt;tFileOutputDelimited.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My input json document looks like&lt;/P&gt; 
&lt;P&gt;{&lt;BR /&gt;"columns": {&lt;BR /&gt;"source": "config",&lt;BR /&gt;"column_details": [{&lt;BR /&gt;"columnname": "col2",&lt;BR /&gt;"datatype": "float"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"columnname": "col3",&lt;BR /&gt;"datatype": "integer"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I would like to create a string in &lt;SPAN&gt;tFileOutputDelimited as&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;"The result set is&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;convert col2 to float&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;convert col3 to integer"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;However due to the loop XPath query parameter being set to "/columns/column_details" in tFileInputJson and creating the string in tMap with columnname and datatype. I get the following output&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The result set is&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;convert col2 to float&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The result set is&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;convert col3 to integer&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Any help is appreciated. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 18:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-two-strings-from-a-Json-loop-into-one/m-p/2366729#M130183</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-23T18:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Merge two strings from a Json loop into one</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-two-strings-from-a-Json-loop-into-one/m-p/2366730#M130184</link>
      <description>&lt;P&gt;Look at the tJavaFlex component, you have to code some java but pretty easy.&lt;BR /&gt;Something like below (didnt test the java code).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basicly in the Pre part you set:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;String fullString = "The result set is ";&lt;/PRE&gt;&lt;P&gt;In the Main part (this will loop over all the rows) , you set&amp;nbsp;:&lt;/P&gt;&lt;PRE&gt;fullString = fullString + "convert " + row.columnname + " to " + row.datatype + "\n"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 22:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-two-strings-from-a-Json-loop-into-one/m-p/2366730#M130184</guid>
      <dc:creator>Jesperrekuh</dc:creator>
      <dc:date>2018-07-23T22:30:29Z</dc:date>
    </item>
  </channel>
</rss>

