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

Highlighted
Six Stars

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

Tags (1)

Accepted Solutions
Highlighted
Employee

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

Hi,

 

   I believe you are trying like below.

image.png

 

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

image.png

 

image.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

Employee

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

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

View solution in original post


All Replies
Highlighted
Employee

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

Hi,

 

   I believe you are trying like below.

image.png

 

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

image.png

 

image.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

Highlighted
Six Stars

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

VM Created date.jpg

Highlighted
Six Stars

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

This is how i solved it

Employee

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

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

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog