Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date fomat issue

Hi,

I want to insert rows from CSV into Oracle.

In CSV I have something like 9/21/2019 8:18,... The date pattern identified in repository is "dd-MM-yyyy", identical with the target one. I tried a lot of formats but none is working. My errors are unparseable or empty. If I use for source and target the mentioned pattern I get "Couldn't parse value for column 'SALE_DATE' in 'row3', value is '9/21/2019 8:18'. Details: java.lang.RuntimeException: Unparseable date: "9/21/2019 8:18"". Even if I add time part. Could you look into this?

Thanks

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

@dansitar 

 

    Thanks for the update. Could you please mark the topic as resolved?

 

     You can refer the link for compatible Java versions for Talend 7.2 from below link.

 

https://help.talend.com/reader/TE5n15~xt69w66DJpqAvMQ/wHWoMMiJKZHaRyxnbUIdCw

 

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

View solution in original post

7 Replies
Sujay1
Creator
Creator

@dansitar  you can find similar question in the below link. I have answered it with sample example.Hope it helps

 

https://community.talend.com/t5/Design-and-Development/Changing-date-type/m-p/204003#M111498

Anonymous
Not applicable
Author

Hi,

I took a look to that solution and it cannot be applied for me.

I'm a newbie in Talend and for me is like a moving sand from many points of view.

1. If I make some changes into a tMap component I cannot be sure that partially an older version is still considered. For instance if I remove a mapping when I run the job it still consider the older settings. So, for each change I make I have to remove my components and to add them again, to re-set...

2. I'm working with delimited files (CSV as input) and Oracle as output. Something that pass the compilation test it is possible to not pass the execution one. For instance, if I work with dates from CSV during the compilation some fields are considered dates, but when I try to run the job they are considered strings. If I'm treating them as strings then the compilation step fails.

3. There are a lot of incompatibilities between types: int, float, short, double, ... evaluating strings with ' ' or " " delimiters, and regarding null values treatment. Due to points 1 and 2 is difficult for me to use the accurate functions. Could you give me some basic guidelines?

I give you a concrete example, starting from my CSV file:

SALE_DATE,COUNTRY_ID,PRODUCT_ID,QUANTITY,DISCOUNT
9/21/2019 8:18,1009,114,5,0.12

I have troubles with SALE_DATE and DISCOUNT. In tMap they are Date and Short/Double in both sides.

In my opinion the date follows "M/d/yyyy H:mm" pattern in CSV. How can I simply move the SALES_DATE from CSV in Oracle as date?! I did use TalendDate.parseDate, TalendDate.formatDate and their combination for SALES_DATE, but the result was unparseable or empty value. For DISCOUNT it was similar. In the compilation phase they are Date/Number, but in execution they are Strings. Should I consider them as being strings in CSV?

 

Thanks

Sujay1
Creator
Creator

@dansitar  i understand it can be tough at the start being a newbie..I have gone through the same. Please post your sample input few records and i can try it out.

Anonymous
Not applicable
Author

Hi,

About 90% of the problems that I had in the last 5 days have been solved by taking again a look into Java preferences' settings.:-(

First I installed the latest JDK. I got a tone of errors and I got rid it and installed a compatible JRE. The things worked fine since I started to get again a lot of errors. I thought I did something wrong. Today in the morning I noticed that Java path points to a 32-bit version and I don't know how this setting appeared. Now I installed a compatible JDK (jdk1.8.0_231), made the right path settings and almost everything is ok.

I still got "Exception in thread "main" java.lang.Error: Unresolved compilation problem: " but the job works ok.

Thanks

Anonymous
Not applicable
Author

@dansitar 

 

Could you please share your error screenshots so that we can understand the problem you are facing?

 

Similarly, if you are having any data issues, please add sample input and expected output records.

 

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

Anonymous
Not applicable
Author

Hi,

Thank you for support. In fact it was a Java compatibility issue. I don't know how this occurred again after I have installed a compatible version and made necessary settings in Preferences - Java - JREs.

Thanks

Anonymous
Not applicable
Author

@dansitar 

 

    Thanks for the update. Could you please mark the topic as resolved?

 

     You can refer the link for compatible Java versions for Talend 7.2 from below link.

 

https://help.talend.com/reader/TE5n15~xt69w66DJpqAvMQ/wHWoMMiJKZHaRyxnbUIdCw

 

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