Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Rimvis
Contributor III
Contributor III

tSchemaComplianceCheck not validating dates with timezone

Hi all,

 

I'm facing a problem when using tSchemaComplianceCheck component to validate incoming date/time.

 

The data comes in the format "yyyy-MM-dd'T'HH:mm:ssXXX", for example "2019-10-02T21:45:33+01:00".

Schema check fails with the message "wrong DATE pattern or wrong DATE data"

 

However, when I'm parsing the same date using the same format, it's working without any issues:

TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ssXXX",... )

 

I have tried setting "Ignore TimeZone when check date" without any effect. 

 

Using Talend Open Studio for Data Integration, v7.1.1

 

Any ideas?

 

Thanks,

Rimvis

Labels (2)
1 Solution

Accepted Solutions
Rimvis
Contributor III
Contributor III
Author

It appears that there is a check box called Use Strict Date Check (in Advanced settings). Validation is working correctly under UTC if this check box is enabled.

View solution in original post

17 Replies
Anonymous
Not applicable

Hi,

 

    If its not working for tSchemaComplianceCheck component alone, could you please create a feature request using JIRA?

 

https://jira.talendforge.org

 

    The interim feature will be to parse it using date parse function and catch any error and convert it to yes or no flag for rejection.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Rimvis
Contributor III
Contributor III
Author

Thanks @nthampi 

 

At the moment I'm just trying to understand, if I'm doing something wrong, or the component does not support date formats with timezone (XXX) at all. I'm happy to raise a feature request if this is the case.

 

Thanks,

Rimvis

Anonymous
Not applicable

Hi Rimvis,

 

       Apologies for the confusion. Just now I checked it again.

 

      You can definitely check the results for this format. You need to read the data as String and do the date check in tSchemaComplainceCheck component as shown below.

0683p000009M7qJ.png

 

If the data is correct, it will be transferred to the main output as shown below.

0683p000009M7l7.png

 

If the data is wrong, it will be transferred to Reject flow as shown below.

0683p000009M7bu.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Rimvis
Contributor III
Contributor III
Author

Hi @nthampi ,

 

It appears that the problem exists only if local time zone is set to UTC. It works as expected under other time settings.

Do you know if there is any workaround for that? Without changing the time settings that is 0683p000009MACn.png

 

Thanks,

Rimvis 

 

Anonymous
Not applicable

Hi,

 

     Could you please share a sample value you are using and the error you are getting with screenshots?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Rimvis
Contributor III
Contributor III
Author

Hi @nthampi ,

 

It's the same value: "2019-10-02T21:45:33+01:00"

The error: wrong DATE pattern or wrong DATE data

 

Here's screenshot with time zone set to UTC+2 (Helsinki , ...)

0683p000009M7qx.png

 

And here's with UTC:

0683p000009M7r2.png

 

I'm attaching my sample job as well.

 

Thanks,

Rimvis


test_schema_check.zip
Anonymous
Not applicable

Hi,

 

   I could not understand any difference between 2 screenshots. I was able to run your job with the data you have given in the sample job.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Rimvis
Contributor III
Contributor III
Author

Hi @nthampi ,

 

In the first screenshot record is validated, and it goes to Main output (Check OK)

In the second screenshot validation fails, and the record goes into Rejects (Check Failed)

All I did between those runs is changed time zone to UTC.

 

Are you saying it runs OK for you in UTC time zone?

 

Thanks,

Rimvis 

Anonymous
Not applicable

Hi,

 

   I could not see any difference in the values in both screenshots. Where are you changing the UTC time zone?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved