Featured Post

Applying Email Validation to a JavaFX TextField Using Binding

This example uses the same controller as in a previous post but adds a use case to support email validation.  A Commons Validator object is ...

Friday, February 4, 2011

SYSDATE in Talend Open Studio

You can set dates in Talend Open Studio using Java, MySQL functions, SQL functions, Talend functions, or user-defined functions.

In Talend Open Studio, there are several ways to retrieve the current date for using in loading and transformation.

In components like tMap, you can use Talend functions or Java.  In tMap, select the Expression Editor and enter the following in one of the target fields.

TalendDate.getCurrentDate()

or

new java.util.Date()

If you're using tMySQLMap, you use MySQL functions. The Expression Editor isn't available in tMySQLMap, so enter the following manually.

NOW()

Another option is to embed the generated date in the source SQL. For example, rather than using a query like

SELECT * FROM SR_DIM_SYSTEM

which is generally the default, try

SELECT system_nm, system_descr_tx, NOW() FROM SR_DIM_SYSTEM.

3 comments:

  1. Carl, Thank you once again for this new post on Talend.

    Talend Community Manager

    ReplyDelete
    Replies
    1. IntelliMindz is a best IT Training in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.
      DevOps Course In Bangalore
      DevOps Online Training
      DevOps Training in Chennai

      Delete
  2. Nice blog on Talend Carl.

    ReplyDelete