tDBInput Date column return null instead of date

Four Stars

tDBInput Date column return null instead of date

Hello,

I'am testing migration from Oracle database data to Postgres with TOS 7.1.1.

Noticed that column with data type date returns null.

Pin it down to tDBInput SQL builder :

 

builder.png

 

tDBInput schema :

 

tdbinput.png

(* tested without quotes ""  too)

 

Set date pattern as suggested at 

https://help.talend.com/reader/3zI67zZ9kaoTVCjNoXuEyw/YHc8JcQYJ7mWCehcQRTEIw :

 

help.png

 

The SQL query should return :

 

oracle.png


Accepted Solutions
Four Stars

Re: tDBInput Date column return null instead of date

Thank you all for quick response.

 

Actually, It was a mistake on my part. I updated date column to test this data type , but forgot to commit it. Therefore, got null as result. 

After commit(in oracle) and guess schema (in tos) :Screen Shot 2019-06-08 at 6.40.54 AM.png

 

got desirable results :

tBuilder.png

However , if it posable , I would like to migrate date type columns without converting it to string on the way. 

View solution in original post


All Replies
Twelve Stars

Re: tDBInput Date column return null instead of date

in an other field, try to convert date to string into your sql query.
it may be helpfull.

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Five Stars

Re: tDBInput Date column return null instead of date

There is no any convertion need, just pulling date as string.

If the destination DB has same date pattern, date might be pushed as string as well. In other case date might be converted in tMap.

Employee

Re: tDBInput Date column return null instead of date

Hi,

 

    Could you please try to add the data type for this columns as Date with format "dd-MMM-yyyy" and ideally it should work fine.

 

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 :-)

Five Stars

Re: tDBInput Date column return null instead of date

so you saying that there is a mistake in documentaion with "d-MMM-yyyy" and it shoul be "dd-MMM-yyyy"?

Employee

Re: tDBInput Date column return null instead of date

Hi,

 

    I have not personally tried the first format and I always prefer the format shared in my previous post. Did you get positive results when you tried in new format?

 

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 :-)

Four Stars

Re: tDBInput Date column return null instead of date

Thank you all for quick response.

 

Actually, It was a mistake on my part. I updated date column to test this data type , but forgot to commit it. Therefore, got null as result. 

After commit(in oracle) and guess schema (in tos) :Screen Shot 2019-06-08 at 6.40.54 AM.png

 

got desirable results :

tBuilder.png

However , if it posable , I would like to migrate date type columns without converting it to string on the way. 

View solution in original post

Employee

Re: tDBInput Date column return null instead of date

Hi,

 

    If you scroll up all the comments associated with this post will be available for your reference.

 

    Since the issue is resolved now, could you please mark the topic as resolved? This will help during reference by other Talend community members and its the best way to tell thanks to authors for contributing their time to your queries.

 

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 :-)

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

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