<?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: tFileOutputDelimited with text enclosure only for type &amp;quot;String&amp;quot; in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227174#M18864</link>
    <description>Hi Gabor,&lt;BR /&gt;It was a comment on the java code that I wrote that uses java.lang.reflection to test the field types and then enclose the strings. i.e. it has to be in the tJavaRow component to work.&lt;BR /&gt;Regards,&lt;BR /&gt;Rick</description>
    <pubDate>Fri, 19 Nov 2010 08:25:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-11-19T08:25:48Z</dc:date>
    <item>
      <title>tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227165#M18855</link>
      <description>Hello 
&lt;BR /&gt;I want to make a CSV file with a tFileOutputDelimited with text enclosure only for type "String" (not for number).
&lt;BR /&gt;exemple:
&lt;BR /&gt; 12;"text2";"text3";15
&lt;BR /&gt; 45;"text4";"text25";12
&lt;BR /&gt;how to do this?
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Eric</description>
      <pubDate>Sat, 16 Nov 2024 13:13:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227165#M18855</guid>
      <dc:creator>ODN</dc:creator>
      <dc:date>2024-11-16T13:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227166#M18856</link>
      <description>in a tJavaRow you can use java.lang.reflect to retrieve the column types, enclose strings in quotes and then write them out to a file delimited with no text enclosure.</description>
      <pubDate>Wed, 03 Nov 2010 13:14:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227166#M18856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-03T13:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227167#M18857</link>
      <description>Hi ODN, 
&lt;BR /&gt;I hope you don't mind me hijacking the thread a little, but I really liked John's idea of using java.lang.reflect, so gave it a go myself (see code below). I'm fairly new to java, so I'm not sure if this would be considered robust enough for say production use. 
&lt;BR /&gt;John, if you would do it differently or have any tips ideas regarding robustness/error checking etc then I'd love to capture your thoughts. 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Rick 
&lt;BR /&gt;Class cls = Class.forName(input_row.getClass().getName()); 
&lt;BR /&gt;Class clsOut = Class.forName(output_row.getClass().getName()); 
&lt;BR /&gt;Field fieldlist[] = cls.getDeclaredFields(); 
&lt;BR /&gt;Field fieldlistOut[] = clsOut.getDeclaredFields(); 
&lt;BR /&gt;for (int i = 0; i &amp;lt; fieldlist.length; i++) { 
&lt;BR /&gt; Field fld = fieldlist 
&lt;I&gt;;&lt;BR /&gt; Field fldOut = fieldlistOut&lt;I&gt;;&lt;BR /&gt; int mod = fld.getModifiers(); &lt;BR /&gt; if ( Modifier.toString(mod).equals("public")) {&lt;BR /&gt; if ( fld.getType().getName().equals("java.lang.String") ) {&lt;BR /&gt; fldOut.set(output_row, "\"" + fld.get(input_row) + "\"");&lt;BR /&gt; } else {&lt;BR /&gt; fldOut.set(output_row, fld.get(input_row));&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;}&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Wed, 03 Nov 2010 14:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227167#M18857</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-03T14:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227168#M18858</link>
      <description>This is all good, but the actual question is that the component should not even place "s around non string columns... &lt;BR /&gt;I would consider the behavior not correct, since an integer is non-text.</description>
      <pubDate>Wed, 03 Nov 2010 23:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227168#M18858</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-03T23:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227169#M18859</link>
      <description>You could do it manually in a map rule by adding " to the start and end of string fields and not setting the csv options in the output file.&lt;BR /&gt;OK if there are only a few fields.</description>
      <pubDate>Thu, 04 Nov 2010 11:22:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227169#M18859</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2010-11-04T11:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227170#M18860</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;This is all good, but the actual question is that the component should not even place "s around non string columns... &lt;BR /&gt;I would consider the behavior not correct, since an integer is non-text.&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Hi CaptainRoo,
&lt;BR /&gt;The code does only enclose strings, however I did neglect to state that:
&lt;BR /&gt;- It should be in a tJavaRow
&lt;BR /&gt;- You will need to include java.lang.reflection.*
&lt;BR /&gt;- You will need to ensure that the tOutputFileDelimited has csv options turned off, so that no automatic enclosure is performed.
&lt;BR /&gt;
&lt;BR /&gt;janhess: you are absolutely correct. This method would add an overhead in processing due to the need to loop through the fields for every row, whereas adding a rule for each field wouldn't have that overhead.
&lt;BR /&gt;Another option would be to create a code routine to add the "s and then apply it to each string field.
&lt;BR /&gt;
&lt;BR /&gt;Regards,
&lt;BR /&gt;Rick</description>
      <pubDate>Thu, 04 Nov 2010 11:55:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227170#M18860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-04T11:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227171#M18861</link>
      <description>Well I edited this topic, because for the first time I was little bit wrong :-)) hehe&lt;BR /&gt; I checked tFileInputDelimited and you are able to use "Text enclosure" feature if you check the CSV option on component. So your functionality is already there.&lt;BR /&gt;This is also available by creating metadata for delimited file, select type CSV and there already is that option related to "Text-enclousure" as """, then the schema will be based on reading that file in a way:&lt;BR /&gt;"alfa" will be String&lt;BR /&gt;245 will be Integer&lt;BR /&gt;So Talend is already ready for your scenario.&lt;BR /&gt;Best regards,&lt;BR /&gt;archenroot</description>
      <pubDate>Sun, 14 Nov 2010 22:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227171#M18861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-14T22:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227172#M18862</link>
      <description>Hello &lt;BR /&gt;I tried with the component "tFileOutputDeleimited "with the option "text enclosure"&lt;BR /&gt;with Integer as I get "123".</description>
      <pubDate>Wed, 17 Nov 2010 10:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227172#M18862</guid>
      <dc:creator>ODN</dc:creator>
      <dc:date>2010-11-17T10:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227173#M18863</link>
      <description>Told you so. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;Rick - aka tchd - why are you saying that it has to be tJavaRow? ODN did not specify that...</description>
      <pubDate>Fri, 19 Nov 2010 02:56:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227173#M18863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-19T02:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227174#M18864</link>
      <description>Hi Gabor,&lt;BR /&gt;It was a comment on the java code that I wrote that uses java.lang.reflection to test the field types and then enclose the strings. i.e. it has to be in the tJavaRow component to work.&lt;BR /&gt;Regards,&lt;BR /&gt;Rick</description>
      <pubDate>Fri, 19 Nov 2010 08:25:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227174#M18864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-19T08:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227175#M18865</link>
      <description>Did anybody get to the bottom of this?&lt;BR /&gt;Experiencing the same issue still. (TOS 6.1.1)</description>
      <pubDate>Wed, 05 Oct 2016 09:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227175#M18865</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-10-05T09:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227176#M18866</link>
      <description>There are some old Jira tickets that raise this issue. &amp;nbsp;They were closed as "not a bug". &amp;nbsp;
&lt;BR /&gt;If the implementation doesn't match users' expectations, perhaps the component's field name should be changed from "Text enclosure" to "Enclose all with".</description>
      <pubDate>Wed, 05 Oct 2016 18:04:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227176#M18866</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2016-10-05T18:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227177#M18867</link>
      <description>This is totally a bug, and I boggle that it's been 6 years and is not resolved.</description>
      <pubDate>Wed, 08 Feb 2017 22:20:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227177#M18867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-08T22:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227178#M18868</link>
      <description>&lt;P&gt;Could we reopen the ticket, and then all of us can post at once on it?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 18:50:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227178#M18868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-26T18:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: tFileOutputDelimited with text enclosure only for type "String"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227179#M18869</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;Here is a related jira issue:&lt;A title="https://jira.talendforge.org/browse/TDI-25031" href="https://jira.talendforge.org/browse/TDI-25031" target="_self" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDI-25031&lt;/A&gt;.&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 05:50:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileOutputDelimited-with-text-enclosure-only-for-type-quot/m-p/2227179#M18869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-21T05:50:34Z</dc:date>
    </item>
  </channel>
</rss>

