• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » 2.2GA tTeradataInput cannot retrieve Date columns

#1 2007-10-10 00:42:53

jpgrogan
Member
Registered: 2007-10-01
Posts: 14

2.2GA tTeradataInput cannot retrieve Date columns

Hi

Running a simple job to 'prove' Teradata is usable with TOS 2.2GA, I found that date column retrieval is not possible.  I tried this in both the query builder and in my simple job design.  Both return the same type of error, relating to failing method getTimeStamp of java.sql.ResultSet.

Do I need to modify the schema of the table(s) I access for each Teradata DATE column I use?  Stacktrace follows for my job design.

Regards
JG



Starting job Teradata001 at 23:17 09/10/2007.
Exception in component tTeradataInput_1
java.sql.SQLException: [NCR][Teradata JDBC Driver]:TeraResultSet:getTimeStamp function failed
    at com.ncr.teradata.ComUtil.ThrowExcp(ComUtil.java:1785)
    at com.ncr.teradata.TeraResultSet.getTimestamp(TeraResultSet.java:4276)
    at com.ncr.teradata.jdbc_3.ifjdbc_4.TeraLocalResultSet.getTimestamp(TeraLocalResultSet.java:909)
    at com.ncr.teradata.jdbc_3.ifjdbc_4.TeraLocalResultSet.getTimestamp(TeraLocalResultSet.java:352)
    at talenddemosjava.teradata001.Teradata001.tTeradataInput_1Process(Teradata001.java:308)
    at talenddemosjava.teradata001.Teradata001.runJob(Teradata001.java:635)
    at talenddemosjava.teradata001.Teradata001.main(Teradata001.java:579)
Job Teradata001 ended at 23:17 09/10/2007. [exit code=1]

Offline

#2 2007-10-10 18:16:25

cantoine
Talend team
Registered: 2006-09-19
Posts: 715
Website

Re: 2.2GA tTeradataInput cannot retrieve Date columns

Hi,

You're right, can you create a bug into our bugTracker ?

The problem is due to a specific java method used for DATE and TIMESTAMP.
We must use getDate for DATE TYPE and getTimeStamp for TIMESTAMP, this is a specific development, because others databases use getTimeStamp for DATE Type.

There is a workaround solution. Specify in your tTeradataInput (edit Schema) a String for your Date field. Then you can format or encode into a Date object with a routine or java function.

Regards.

Offline

#3 2007-10-10 20:31:44

jpgrogan
Member
Registered: 2007-10-01
Posts: 14

Re: 2.2GA tTeradataInput cannot retrieve Date columns

Hi

I have not checked, but this is probably a problem in all Teradata-related components.

I will add a bugtracker entry for the failing component and add a note about the possibility of the problem relating to more than just this one.

BRgds
JG

Offline

#4 2007-10-10 20:36:20

jpgrogan
Member
Registered: 2007-10-01
Posts: 14

Re: 2.2GA tTeradataInput cannot retrieve Date columns

Unfortunately I cannot add the bugtracker entry as website will not let me login or sign up for a new account.  I does not recognise my existing login id (jpgrogan) - could someone do this for me please, or alternatively tell me how to gain entry to the bugtracking system?

Many thanks
James

Offline

#5 2007-10-10 21:28:32

jpgrogan
Member
Registered: 2007-10-01
Posts: 14

Re: 2.2GA tTeradataInput cannot retrieve Date columns

Hi

cantoine wrote:

The problem is due to a specific java method used for DATE and TIMESTAMP.
We must use getDate for DATE TYPE and getTimeStamp for TIMESTAMP, this is a specific development, because others databases use getTimeStamp for DATE Type.

Please note that the value in the DATE column I was retrieving was NULL when the exception occurred. 

This could not even have been run, let alone tested.

Nonetheless, I would be keen to learn more about the inner workings of Talend, could you tell me where (in which package / class) the fix would be needed?  I would be keen to see the 'incorrect' code in order to understand the problem more fully.

In the meantime, I will try your workaround.

Thank you
JG

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » 2.2GA tTeradataInput cannot retrieve Date columns

Board footer

Powered by FluxBB