How to pass defult talend date to the output

Highlighted
Six Stars

How to pass defult talend date to the output

Hi All,

 

I have a output table(mysql) which has a date field called syncdate format (YYYY-mm-dd hh:mm:ss) ex(2018-01-01 00:23:30). I need to load with date, whenever talend job runs. basically need to insert current date. In the tmap expression I have entered the defult function. The test result is coming correct as required but the job fails.

 

Kindly help in providing correct expression. Please check attached image for more details.


Accepted Solutions
Forteen Stars

Re: How to pass defult talend date to the output

You no need to use "TalendDate.getCurrentDate() " exactly and on the output coulmn date format speciy in "YYYY-mm-dd hh:mm:ss" and it works.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

View solution in original post


All Replies
Forteen Stars

Re: How to pass defult talend date to the output

 check the date format in mysql table ? and job is failling at tMsqloutput component right?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Six Stars

Re: How to pass defult talend date to the output

`SyncedDate` datetime DEFAULT NULL my output, Job failing in tmap

Forteen Stars

Re: How to pass defult talend date to the output

what is the error and please attahce the screenshot.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Six Stars

Re: How to pass defult talend date to the output

PFA error details

Six Stars

Re: How to pass defult talend date to the output

One more screenshot

Forteen Stars

Re: How to pass defult talend date to the output

i do not findthe error in that screnshot.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: How to pass defult talend date to the output

I have used,its working for me check.

 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: How to pass defult talend date to the output

You no need to use "TalendDate.getCurrentDate() " exactly and on the output coulmn date format speciy in "YYYY-mm-dd hh:mm:ss" and it works.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

View solution in original post

Six Stars

Re: How to pass defult talend date to the output

Thanks a lot Manohar. It's working now.

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