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: 
amtkmr1990
Contributor II
Contributor II

Taledn DI converts blank date to 1900-01-01 00:00:00.000

Hi Team , 

I have csv file in following format

vm_name,memory,CPU,VM_Created_Date

"prod111","32","2",

"stg","34","4", "7/12/2019 3:23:41 AM"

 

You can see in row 1 vm_created_date is blank (NOT "", NOT null). It is just blank. 

Now in talend DI tmap it convertes the blank date to 1900-01-01 00:00:00.000. And for row 2 where there is date, Talend tmap keeps it as it. (Which is correct)

 

I want to

1. keep blank as null  (in row1)

2. and datetime as datetime (in row2)

 

How can i do this. 

 

i tried below in tmap but it makes null for everything 

TalendDate.isDate(row1.VM_Created_Date,"m/d/yyyy h:mm:ss a")?row1.VMCreateDate:null

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

 

   I believe you are trying like below.

0683p000009M8Ls.png

 

You need to add the component details as below and the schema will have to be configured as below.

0683p000009M8Lx.png

 

0683p000009M8M2.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

View solution in original post

4 Replies
Anonymous
Not applicable

Hi,

 

   I believe you are trying like below.

0683p000009M8Ls.png

 

You need to add the component details as below and the schema will have to be configured as below.

0683p000009M8Lx.png

 

0683p000009M8M2.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

amtkmr1990
Contributor II
Contributor II
Author

0683p000009M8NA.jpg

amtkmr1990
Contributor II
Contributor II
Author

This is how i solved it

Anonymous
Not applicable

Hi,

 

   Thanks for sharing the solution path you had taken. I would personally prefer to avoid the custom coding if we have some graphical option available in Talend tool. Both both options do the same job and will give same results.

 

    Could you please mark both methods as solutions to the post? It will help other Talend community members during their reference.

 

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