<?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: tSchemaComplianceCheck : type check doesn't work ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tSchemaComplianceCheck-type-check-doesn-t-work/m-p/2377633#M139444</link>
    <description>&lt;P&gt;Thank you rhall I understood and everything is ok !&lt;/P&gt;&lt;P&gt;In this case, right after the tSchemaComplianceCheck it's necessary to use a tConvertType to convert everything from String to the real types we want.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jan 2022 16:00:18 GMT</pubDate>
    <dc:creator>Alpha549</dc:creator>
    <dc:date>2022-01-18T16:00:18Z</dc:date>
    <item>
      <title>tSchemaComplianceCheck : type check doesn't work ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSchemaComplianceCheck-type-check-doesn-t-work/m-p/2377631#M139442</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm discovering tSchemaComplianceCheck with a simple test job :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N1yh0AAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135601i0804584376E3FF66/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N1yh0AAB.png" alt="0695b00000N1yh0AAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the tFileInputDelimited schema :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N1ykNAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147038iDF06F23FCB692F5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N1ykNAAR.png" alt="0695b00000N1ykNAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tSchemaComplianceCheck :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N1ykcAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156619iB0ABB30762A45E52/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N1ykcAAB.png" alt="0695b00000N1ykcAAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N1yl1AAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145311i95C65D83A1D0C4C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N1yl1AAB.png" alt="0695b00000N1yl1AAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The input delimited file :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N1ylfAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136181i0626D5A540DF7774/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N1ylfAAB.png" alt="0695b00000N1ylfAAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, here is what I get when I run the job :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N1ymOAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132542i9A4C3C23FD18F53E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N1ymOAAR.png" alt="0695b00000N1ymOAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was expecting to find my D2 line in the tLogRow2 as COL3 is not an Integer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or I didn't get how tSchemaComplianceCheck component works ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 16:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSchemaComplianceCheck-type-check-doesn-t-work/m-p/2377631#M139442</guid>
      <dc:creator>Alpha549</dc:creator>
      <dc:date>2022-01-17T16:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: tSchemaComplianceCheck : type check doesn't work ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSchemaComplianceCheck-type-check-doesn-t-work/m-p/2377632#M139443</link>
      <description>&lt;P&gt;This can be a bit confusing to start with. The problem you have here is that you are setting the class of the Integer column at the tFileInputDelimited point. This component will read the data in (flat file data is essentially a String) and will convert (or try to convert) the data to String, String and Integer columns. If the conversion is not possible, it will fail at this point. As you can see from the error at the top of your log, this column is unable to be converted by the tFileInputDelimited component, therefore it fails the row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To test the tSchemaComplianceCheck, you would need to read everything in your flat file in as a String. The assumption is that at this point, you may not know that the content of the file is correct. There are often errors. So you read it in as Strings, then you use the tSchemaComplianceCheck to ensure that the data meets the expected schema before you then convert it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, for the following data....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;col1; col2; col3&lt;/P&gt;&lt;P&gt;aa;    bb;    1&lt;/P&gt;&lt;P&gt;cd;    hj;     3&lt;/P&gt;&lt;P&gt;df;    gh;     t&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....col1 is a String, col2 is a String and col3 is meant to be an Integer. However ALL data is retrieved as Strings (the safest data type for files). Then we would connect it to a tSchemaComplianceCheck component which is expecting col1 to be a String, col2 to be a String and col3 to be an Integer. If we connect the tSchemaComplianceCheck to two tLogRows (as you have done), we would see the following result....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tLogRow1&lt;/P&gt;&lt;P&gt;aa|bb|1&lt;/P&gt;&lt;P&gt;cd|hj|3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tLogRow2&lt;/P&gt;&lt;P&gt;df|gh|t|2|newColumn2:wrong type&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 22:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSchemaComplianceCheck-type-check-doesn-t-work/m-p/2377632#M139443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-17T22:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: tSchemaComplianceCheck : type check doesn't work ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSchemaComplianceCheck-type-check-doesn-t-work/m-p/2377633#M139444</link>
      <description>&lt;P&gt;Thank you rhall I understood and everything is ok !&lt;/P&gt;&lt;P&gt;In this case, right after the tSchemaComplianceCheck it's necessary to use a tConvertType to convert everything from String to the real types we want.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 16:00:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSchemaComplianceCheck-type-check-doesn-t-work/m-p/2377633#M139444</guid>
      <dc:creator>Alpha549</dc:creator>
      <dc:date>2022-01-18T16:00:18Z</dc:date>
    </item>
  </channel>
</rss>

