<?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: Apply logic to all fields at once? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369168#M132345</link>
    <description>&lt;P&gt;yeah.. well the source is MSSQL. Table has 200 fields and the issue is that any string&amp;nbsp;field can have "\n" as a hidden character. This causes a row in target file to break into multiple rows. To overcome this, I have to replace "\n" with "". The problem is that "\n" can appear in any field so the logic needs to applied on all fields.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2018 06:15:53 GMT</pubDate>
    <dc:creator>the_etl_guy</dc:creator>
    <dc:date>2018-02-20T06:15:53Z</dc:date>
    <item>
      <title>Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369162#M132339</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to apply some logic to all fields at once?&lt;/P&gt;&lt;P&gt;Like if I have to apply LTRIM to all 200 incoming fields then instead of doing this at individual field level i.e 200 times, is there any&amp;nbsp;not so laborious way to achieve this?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 02:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369162#M132339</guid>
      <dc:creator>the_etl_guy</dc:creator>
      <dc:date>2018-02-20T02:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369163#M132340</link>
      <description>You may need to call manully ,untill unless you call the specific funaction,it will not do the required operation.</description>
      <pubDate>Tue, 20 Feb 2018 04:35:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369163#M132340</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2018-02-20T04:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369164#M132341</link>
      <description>&lt;P&gt;Thanks Manohar, could you please elaborate?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 05:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369164#M132341</guid>
      <dc:creator>the_etl_guy</dc:creator>
      <dc:date>2018-02-20T05:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369165#M132342</link>
      <description>&lt;P&gt;We can reduce our manual intervention by some&amp;nbsp; tricky way (below is my thought process but there could be some other easy also)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a routine with ltrim functionality with null handling scenario .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your input ---&amp;gt; tjava row (sync the columns , generate the code ) and with the help of text editor 's find and replace option apply the newly created routine ..&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample Routine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;package routines;&lt;/P&gt;
&lt;P&gt;public class ltrimr {&lt;BR /&gt;public static String ltrim(String datain) {&lt;BR /&gt;String dataout="";&lt;BR /&gt;if (datain == null) {&lt;BR /&gt;dataout= datain;&lt;BR /&gt;}&lt;BR /&gt;else if(datain!=null)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;dataout= datain.replaceAll("^\\s+","");&lt;BR /&gt;}&lt;BR /&gt;return dataout;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tjava row logic :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output_row.newColumn = ltrimr.ltrim(input_row.newColumn);&lt;BR /&gt;output_row.newColumn1 = ltrimr.ltrim(input_row.newColumn1);&lt;BR /&gt;output_row.newColumn2 = ltrimr.ltrim(input_row.newColumn2);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 05:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369165#M132342</guid>
      <dc:creator>ashif2</dc:creator>
      <dc:date>2018-02-20T05:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369166#M132343</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMCuAAO"&gt;@ashif&lt;/A&gt;, that's an interesting approach when&amp;nbsp;used with a text editor. I am also thinking of using a database function on each field at SQL level, again a text editor will save a lot time here but am not sure how it will affect the performance.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;SELECT&lt;/P&gt; 
&lt;P&gt;A,B,C,D.....&lt;/P&gt; 
&lt;P&gt;FROM TABLE;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;REPLACE "," with "),LTRIM(" will do 99% of the job in a jiffy!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;SELECT&lt;BR /&gt;A),LTRIM(B),LTRIM(C),LTRIM(D.....&lt;BR /&gt;FROM TABLE;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But again, this is handy and efficient only in case of simple operations like LTRIM&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 05:55:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369166#M132343</guid>
      <dc:creator>the_etl_guy</dc:creator>
      <dc:date>2018-02-20T05:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369167#M132344</link>
      <description>&lt;P&gt;it could be better , if you explain the scenario with complete information like nature of source (whether it is relational,structured files, semi- structured files ).&amp;nbsp; Nothing has been specified so community people will try to give you a generic solution (solution at talend level).&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 06:03:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369167#M132344</guid>
      <dc:creator>ashif2</dc:creator>
      <dc:date>2018-02-20T06:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369168#M132345</link>
      <description>&lt;P&gt;yeah.. well the source is MSSQL. Table has 200 fields and the issue is that any string&amp;nbsp;field can have "\n" as a hidden character. This causes a row in target file to break into multiple rows. To overcome this, I have to replace "\n" with "". The problem is that "\n" can appear in any field so the logic needs to applied on all fields.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 06:15:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369168#M132345</guid>
      <dc:creator>the_etl_guy</dc:creator>
      <dc:date>2018-02-20T06:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369169#M132346</link>
      <description>&lt;P&gt;Create a routine with&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;logic&lt;STRONG&gt; replaceAll("\\r\\n|\\r|\\n", " ")&lt;/STRONG&gt; ( include null handling logic) and call the routine in tJavaRow.&amp;nbsp; Its handy because if any other new characters needs to be handled which can be achieved by simple change and routine and regeneration of code-build&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 06:55:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369169#M132346</guid>
      <dc:creator>ashif2</dc:creator>
      <dc:date>2018-02-20T06:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Apply logic to all fields at once?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369170#M132347</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMCuAAO"&gt;@ashif&lt;/A&gt;&amp;nbsp;I get your point, probably this is the easiest way so far. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 22:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Apply-logic-to-all-fields-at-once/m-p/2369170#M132347</guid>
      <dc:creator>the_etl_guy</dc:creator>
      <dc:date>2018-02-20T22:25:28Z</dc:date>
    </item>
  </channel>
</rss>

