<?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 getting arrays from the nulls in strings and nulls in  integer values  tWriteJSONField in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197589#M1273</link>
    <description>&lt;P&gt;Hello All&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am writing to JSON file from CSV, in that process see the below json file how it is generated&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"object": {&lt;BR /&gt;"number": "1548364482",&amp;nbsp;&amp;nbsp;&lt;BR /&gt;"ID": "378827052",&lt;BR /&gt;"name": [],&amp;nbsp; (string datatype)&lt;BR /&gt;"ChainNumber": [],&amp;nbsp; (integer datatype)&lt;BR /&gt;&lt;BR /&gt;"dispenserTypeCode": "1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the above string and integer data types i don't have any data&amp;nbsp; in my CSV which are null&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So my expected output is below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"object": {&lt;BR /&gt;"number": "1548364482",&lt;BR /&gt;"ID": "378827052",&lt;BR /&gt;"name": "",&amp;nbsp; (string datatype)&lt;BR /&gt;"ChainNumber": null, ( for integer datatype)&lt;BR /&gt;&lt;BR /&gt;"dispenserTypeCode": "1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can any one help me how to configure the twritejsonfeilds to get this kind of output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks In Advance&lt;/P&gt;
&lt;P&gt;Manish&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:24:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T04:24:46Z</dc:date>
    <item>
      <title>getting arrays from the nulls in strings and nulls in  integer values  tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197589#M1273</link>
      <description>&lt;P&gt;Hello All&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am writing to JSON file from CSV, in that process see the below json file how it is generated&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"object": {&lt;BR /&gt;"number": "1548364482",&amp;nbsp;&amp;nbsp;&lt;BR /&gt;"ID": "378827052",&lt;BR /&gt;"name": [],&amp;nbsp; (string datatype)&lt;BR /&gt;"ChainNumber": [],&amp;nbsp; (integer datatype)&lt;BR /&gt;&lt;BR /&gt;"dispenserTypeCode": "1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the above string and integer data types i don't have any data&amp;nbsp; in my CSV which are null&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So my expected output is below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"object": {&lt;BR /&gt;"number": "1548364482",&lt;BR /&gt;"ID": "378827052",&lt;BR /&gt;"name": "",&amp;nbsp; (string datatype)&lt;BR /&gt;"ChainNumber": null, ( for integer datatype)&lt;BR /&gt;&lt;BR /&gt;"dispenserTypeCode": "1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can any one help me how to configure the twritejsonfeilds to get this kind of output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks In Advance&lt;/P&gt;
&lt;P&gt;Manish&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:24:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197589#M1273</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: getting arrays from the nulls in strings and nulls in  integer values  tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197590#M1274</link>
      <description>&lt;P&gt;Hi Manish,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; What about your input data? Is it an array for these problematic columns? Could you please share 5 input sample records so that we will get more idea?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 21:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197590#M1274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-10T21:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: getting arrays from the nulls in strings and nulls in  integer values  tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197591#M1275</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000006eKOgAAM"&gt;@nthampi&lt;/A&gt;&amp;nbsp;Thanks&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My input data is below, if we don't have a data while getting from csv and writing to json am not getting empty strings, rather getting empty arrays for string and integer like this [], [] , []&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Boolean&lt;/TD&gt; 
   &lt;TD&gt;string&lt;/TD&gt; 
   &lt;TD&gt;string&lt;/TD&gt; 
   &lt;TD&gt;int&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;FALSE&lt;/TD&gt; 
   &lt;TD&gt;No&lt;/TD&gt; 
   &lt;TD&gt;Generic&lt;/TD&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;FALSE&lt;/TD&gt; 
   &lt;TD&gt;Non&lt;/TD&gt; 
   &lt;TD&gt;Generic&lt;/TD&gt; 
   &lt;TD&gt;2&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;FALSE&lt;/TD&gt; 
   &lt;TD&gt;None&lt;/TD&gt; 
   &lt;TD&gt;Generic&lt;/TD&gt; 
   &lt;TD&gt;4&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt; 
&lt;P&gt;Manish&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 22:08:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197591#M1275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-10T22:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: getting arrays from the nulls in strings and nulls in  integer values  tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197592#M1276</link>
      <description>&lt;P&gt;Hi Manish,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Your input and output data looks totally different in your previous posts. Lets start again on a clean slate. Could you please provide 5 input records and corresponding JSON output in expected and actual cases?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 23:23:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197592#M1276</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-10T23:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: getting arrays from the nulls in strings and nulls in  integer values  tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197593#M1277</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000006eKOgAAM"&gt;@nthampi&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The above below is the input csv&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Boolean&lt;/TD&gt; 
   &lt;TD&gt;string&lt;/TD&gt; 
   &lt;TD&gt;string&lt;/TD&gt; 
   &lt;TD&gt;int&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;FALSE&lt;/TD&gt; 
   &lt;TD&gt;No&lt;/TD&gt; 
   &lt;TD&gt;Generic&lt;/TD&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;FALSE&lt;/TD&gt; 
   &lt;TD&gt;Non&lt;/TD&gt; 
   &lt;TD&gt;Generic&lt;/TD&gt; 
   &lt;TD&gt;2&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;FALSE&lt;/TD&gt; 
   &lt;TD&gt;None&lt;/TD&gt; 
   &lt;TD&gt;Generic&lt;/TD&gt; 
   &lt;TD&gt;4&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And the Json am getting is like below&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"json": [&lt;/P&gt; 
&lt;P&gt;{&lt;/P&gt; 
&lt;P&gt;"Boolean" :false,&lt;/P&gt; 
&lt;P&gt;"string" :"no",&lt;/P&gt; 
&lt;P&gt;"string": "generic",&lt;/P&gt; 
&lt;P&gt;"int":1&lt;/P&gt; 
&lt;P&gt;},&lt;/P&gt; 
&lt;P&gt;{&lt;/P&gt; 
&lt;P&gt;"Boolean" :false,&lt;/P&gt; 
&lt;P&gt;"string" :"non",&lt;/P&gt; 
&lt;P&gt;"string": "generic",&lt;/P&gt; 
&lt;P&gt;"int":2&lt;/P&gt; 
&lt;P&gt;},&lt;/P&gt; 
&lt;P&gt;{&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#FF0000"&gt;"Boolean" :[],&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#FF0000"&gt;"string" : [],&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#FF0000"&gt;"string": [],&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#FF0000"&gt;"int":[]&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#FF0000"&gt;},&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;{&lt;/P&gt; 
&lt;P&gt;"Boolean" :false,&lt;/P&gt; 
&lt;P&gt;"string" :"none",&lt;/P&gt; 
&lt;P&gt;"string": "generic",&lt;/P&gt; 
&lt;P&gt;"int":4&lt;/P&gt; 
&lt;P&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;Please look at the red highlighted one, how would i rectify that&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;that highlighted red is expected in this format&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;{&lt;/P&gt; 
&lt;P&gt;"Boolean" :&amp;nbsp; ,&lt;/P&gt; 
&lt;P&gt;"string" :"",&lt;/P&gt; 
&lt;P&gt;"string": "",&lt;/P&gt; 
&lt;P&gt;"int":null&lt;/P&gt; 
&lt;P&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt; 
&lt;P&gt;Manish&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:51:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197593#M1277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-11T13:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: getting arrays from the nulls in strings and nulls in  integer values  tWriteJSONField</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197594#M1278</link>
      <description>&lt;P&gt;Hi Manish,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; There seems to be some problem in the input JSON you have provided. I would recommend to test it with JSONLint or some other tool.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Coming to the issue, you are trying to load a Boolean and integer value with empty string. The concept about boolean is that if true value is not available, by default, it will become false. So you will have to either provide true or false value. The best chance in your case will be to convert all the columns to String and then do the JSON conversion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt;
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2019 19:16:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getting-arrays-from-the-nulls-in-strings-and-nulls-in-integer/m-p/2197594#M1278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-13T19:16:24Z</dc:date>
    </item>
  </channel>
</rss>

