<?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: Capture Invalid Date type Values in tMap reject flow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229441#M20380</link>
    <description>&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt; , I made tMap changes in my job similar to your job but still, all 3 rows are going in reject flow.</description>
    <pubDate>Thu, 05 Sep 2019 14:21:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-05T14:21:03Z</dc:date>
    <item>
      <title>Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229437#M20376</link>
      <description>&lt;P&gt;I have a Talend Job which reads data from Excel File (.xlsx) via tFileInputExcel component.&lt;/P&gt;&lt;P&gt;There is a column Payment_Date which I have defined as type String in the above component. Reason Excel has 3 rows and for all 3 rows value in Payment_Date column are different as shown below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Payment_Date
7/1/2019
NULL&lt;BR /&gt;4568&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First row is a valid Date&lt;/P&gt;&lt;P&gt;In the second row string "NULL" is not equivalent to null so I am using tReplace component for replacing string "NULL" to null&lt;/P&gt;&lt;P&gt;Post that I am using tJavaRow to capture input data and pass it via output_row as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below code says if the value from Input is null then pass null in output else if value is a valid date then pass the valid date to the output&lt;/P&gt;&lt;PRE&gt;output_row.Payment_Date = Relational.ISNULL(input_row.Payment_Date) ? null : TalendDate.parseDateLocale("EEE MMM d HH:mm:ss zzz yyyy", input_row.Payment_Date, "en");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And that in tMap, row6.Payment_Date&amp;nbsp; (In out-flow of tMap, Payment_Date column is of Date type)&lt;/P&gt;&lt;P&gt;Above approach is working for Valid Date and NULL value but for Invalid Date i.e. 4568 I want that row to be captured in reject flow. But instead, my job fails on tJavaRow with &lt;STRONG&gt;error java.text.ParseException: Unparseable date: "4568"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Job flow:&lt;/P&gt;&lt;P&gt;tFileInputExcel&amp;nbsp; ----main---&amp;gt;tReplace --main----&amp;gt;tJavaRow --main--&amp;gt;tMap---main--&amp;gt;tLogRow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 09:53:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229437#M20376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T09:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229438#M20377</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll probably want to use the TalendDate.isDate() function. Have a look at&amp;nbsp;&lt;A href="https://help.talend.com/reader/yyWN3FfPMuKdLZZ0B3WN7A/Qk67jXW7vM2b2TU6t3IILQ" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;this link&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:00:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229438#M20377</guid>
      <dc:creator>David_Beaty</dc:creator>
      <dc:date>2019-09-05T13:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229439#M20378</link>
      <description>&lt;P&gt;I have changed my job design now I am not using tJavaRow. Instead, I am directly connecting tReplace --main--tMap&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLtjAAG"&gt;@dsoulalioux&lt;/A&gt;&amp;nbsp;I am already using isDate function to validate if the date from Input flow is a valid date but somehow it is considering all my input dates to be invalid, even for the valid ones like 7/1/2019 and hence now all my Payment_Dates which I had mentioned in my previous post are going to Reject flow.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Expression in Var (To validate if the date is a valid date or not):&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;TalendDate.isDate(row6.Payment_Date,"dd/MM/yyyy",true)&lt;BR /&gt;&lt;BR /&gt;OR

TalendDate.isDate(row6.Payment_Date,"E MMM dd HH:mm:ss Z yyyy",true)&lt;BR /&gt;&lt;BR /&gt;Where, row6.Payment_Date from Input is String type as isDate requires 3 parameters (String,String,Boolean)&lt;/PRE&gt; 
&lt;P&gt;Tried both, but still same output all rows in reject flow.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Expression in out3 flow, if Var (is_Date is true)&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;Relational.ISNULL(row6.Payment_Date) ? null :TalendDate.parseDateLocale("EEE MMM d HH:mm:ss zzz yyyy", row6.Payment_Date, "en") &lt;/PRE&gt; 
&lt;P&gt;In the above flow, only vaid and null dates should pass&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Expression in reject flow if Var (is_Date is false)&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;row6.Payment_Date&lt;/PRE&gt; 
&lt;P&gt;In the above flow, invalid dates should be as it is passed to reject flow&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tMap" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6sG.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136831iBB255B8C8C600EE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6sG.jpg" alt="0683p000009M6sG.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;tMap&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Job" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6vY.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132549iC7E5038146314C58/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6vY.jpg" alt="0683p000009M6vY.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Job&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229439#M20378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T13:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229440#M20379</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLtIAAW"&gt;@Vikas&lt;/A&gt;&amp;nbsp;,check the below example.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6Pa.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152918i7313A4BBFE7B0B26/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6Pa.png" alt="0683p000009M6Pa.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6d0.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139136i4559A35CAE3CD978/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6d0.png" alt="0683p000009M6d0.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sourcedata" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6vd.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127709i7DEB54AD5E154221/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6vd.png" alt="0683p000009M6vd.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;sourcedata&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:55:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229440#M20379</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2019-09-05T13:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229441#M20380</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt; , I made tMap changes in my job similar to your job but still, all 3 rows are going in reject flow.</description>
      <pubDate>Thu, 05 Sep 2019 14:21:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229441#M20380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T14:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229442#M20381</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLtIAAW"&gt;@Vikas&lt;/A&gt;&amp;nbsp;,can you just correct&amp;nbsp;&lt;SPAN&gt;7/1/2019 to 07/01/2019 ,so you will get one record .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 14:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229442#M20381</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2019-09-05T14:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229443#M20382</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLtIAAW"&gt;@Vikas&lt;/A&gt;&amp;nbsp;,either you need to correct the source data or you need to change the format of&amp;nbsp;TalendDate.isDate(row2.newColumn,"d/M/yyyy") from "dd/MM/yyyy" to&amp;nbsp;"d/M/yyyy" .&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 14:31:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229443#M20382</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2019-09-05T14:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229444#M20383</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt; , Thank you so much for your help. But I cannot change/correct the value in Source File and after changing isDate format to TalendDate.isDate(row2.newColumn,"d/M/yyyy") 
&lt;BR /&gt;still all rows in reject flow 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 05 Sep 2019 15:13:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229444#M20383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T15:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229445#M20384</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLtIAAW"&gt;@Vikas&lt;/A&gt;&amp;nbsp;,I am sure your source data may be other than 7/9/2019 because of that it is going to reject only,you need to identify the source data. I have tested the above scenarios and working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 15:17:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229445#M20384</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2019-09-05T15:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229446#M20385</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW" target="_self"&gt;&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I m pretty sure Source Data is in 3 forms&lt;BR /&gt;&lt;BR /&gt;7/1/2019 (valid)&lt;BR /&gt;null (valid)&lt;BR /&gt;4567 (invalid)&lt;BR /&gt;&lt;BR /&gt;One more thing I wanted to point out I created new job same as ur's it worked partially. The reason I am saying partially is because I wanted row which has null value to in Valid scenario not in reject. Any idea how can I get that null value in Valid flow ?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 17:40:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229446#M20385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T17:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Invalid Date type Values in tMap reject flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229447#M20386</link>
      <description>&lt;P&gt;Finally made it work. Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;For your input. But the issue was not with specifying the correct date format in Source Data but in Expressions and also handling of null value as Valid scenario.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Sharing the screenshot of updated settings so that it might help someone with a similar type of issue.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Expression in Var:&lt;/P&gt; 
&lt;PRE&gt;(Relational.ISNULL(row3.Payment_Date) || (!Relational.ISNULL(row3.Payment_Date)) &amp;amp;&amp;amp; TalendDate.isDate(row3.Payment_Date,"M/d/yyyy",true) ) &lt;/PRE&gt; 
&lt;P&gt;Expression in ValidDates:&lt;/P&gt; 
&lt;PRE&gt;Relational.ISNULL(row3.Payment_Date) ? null :TalendDate.parseDateLocale("M/d/yyyy", row3.Payment_Date, "en") &lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Job_Output" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6wC.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142677iE97DAEA5EB7F81EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6wC.jpg" alt="0683p000009M6wC.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Job_Output&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Updated tMap" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6wM.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139924i65C1B9E54C0A062B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6wM.jpg" alt="0683p000009M6wM.jpg" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Updated tMap&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2019 10:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Capture-Invalid-Date-type-Values-in-tMap-reject-flow/m-p/2229447#M20386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-07T10:41:10Z</dc:date>
    </item>
  </channel>
</rss>

