<?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: Get String Length of the output_row fields from a Java component. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302174#M74192</link>
    <description>&lt;P&gt;Hi Shong, thanks for your reply.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Currently I have implemented the tSchemaComplianceCheck for validation, but this will only validate per complete row and per column.&lt;/P&gt; 
&lt;P&gt;I want to be able to check per column and only lose a column's data rather than a complete row.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Attached is my implementation where in the tJavaRow I am doing the mappings and would like to do the validations.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;Rene&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsFA"&gt;talend_validation.png&lt;/A&gt;</description>
    <pubDate>Fri, 18 Aug 2017 07:05:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-18T07:05:03Z</dc:date>
    <item>
      <title>Get String Length of the output_row fields from a Java component.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302172#M74190</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt; 
&lt;P&gt;I am trying to build data verification in a Talend Java component (currently using a tJavaRow), where the fields being processed are checked against the String Size in the output row field.&lt;/P&gt; 
&lt;P&gt;This validation would be used to identify if columns contain Strings which are larger than intended and alert about these but still process others in the same row.&lt;/P&gt; 
&lt;P&gt;I have found information on getting the sizes for dynamic schemas but there does not seem to be any information for normal String Length.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In a nutshell, from a Java component I would like to get the Length from the output row schema for each field.&lt;/P&gt; 
&lt;P&gt;Is this possible?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 08:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302172#M74190</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-16T08:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Get String Length of the output_row fields from a Java component.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302173#M74191</link>
      <description>&lt;P&gt;Hello &lt;BR /&gt;Maybe tSchemaCompilanceCheck component can fit your need for data validation? Can you please show us some data to explain your requirement?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shong&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 03:29:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302173#M74191</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-18T03:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get String Length of the output_row fields from a Java component.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302174#M74192</link>
      <description>&lt;P&gt;Hi Shong, thanks for your reply.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Currently I have implemented the tSchemaComplianceCheck for validation, but this will only validate per complete row and per column.&lt;/P&gt; 
&lt;P&gt;I want to be able to check per column and only lose a column's data rather than a complete row.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Attached is my implementation where in the tJavaRow I am doing the mappings and would like to do the validations.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;Rene&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsFA"&gt;talend_validation.png&lt;/A&gt;</description>
      <pubDate>Fri, 18 Aug 2017 07:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302174#M74192</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-18T07:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get String Length of the output_row fields from a Java component.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302175#M74193</link>
      <description>I don't know what are your expected output? To check if the column contains string and get the length of column, you can use this expression, eg: 
&lt;BR /&gt;if(StringHandling.IS_ALPHA(input_row.columnName)==true){ 
&lt;BR /&gt;if(input_row.columnName.length()&amp;gt;5){ 
&lt;BR /&gt;output_row.columnName="this column is invalid"; 
&lt;BR /&gt;}else{ 
&lt;BR /&gt;output_row.columnName=input_row.columnName; 
&lt;BR /&gt;} 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 18 Aug 2017 07:48:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302175#M74193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-18T07:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get String Length of the output_row fields from a Java component.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302176#M74194</link>
      <description>&lt;P&gt;As stated I want a validation on the Output column so that if the input data size is larger than the output column size, only the column's data is lost.&lt;/P&gt;
&lt;P&gt;I am already able to get the output column instance through java.lang.reflect and identify it's datatype, but haven't managed to get a column's length/size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you explained I can make a check by hardcoding the values for validation but whenever there is a change in the output column I would need to change the code as well.&lt;/P&gt;
&lt;P&gt;Ideally I have this done programmatically through Java as it would save time in implementing changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Rene&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 09:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-String-Length-of-the-output-row-fields-from-a-Java-component/m-p/2302176#M74194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-18T09:04:46Z</dc:date>
    </item>
  </channel>
</rss>

