Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mboss1649680202
Contributor II
Contributor II

getting tmap error on date datatype

i am trying to copy data from sql server to oracle database.

i created same table in oracle. i created tmap. The problem is i am getting errors when copying date columns. if i ignore date columns data is copied properly.

The column in both sql and oracle database is date.

data in sql server is stored as YYYY-MM-DD.

 

 

Error is :

Starting job Limousine_sqlsrv_oracle at 13:29 13/04/2022.

[statistics] connecting to socket on port 3882

[statistics] connected

2022-04-13 13:29:31|6QHvSW|6QHvSW|6QHvSW|66824|TEST|Limousine_sqlsrv_oracle|_distwLsDEeytAen3XqwuhQ|0.1|Default||begin||

Exception in component tDBOutput_1 (Limousine_sqlsrv_oracle)

java.lang.ClassCastException: class java.sql.Timestamp cannot be cast to class java.sql.Date (java.sql.Timestamp and java.sql.Date are in module java.sql of loader 'platform')

   at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:2051)

   at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:2102)

   at test.limousine_sqlsrv_oracle_0_1.Limousine_sqlsrv_oracle.tDBInput_1Process(Limousine_sqlsrv_oracle.java:2383)

   at test.limousine_sqlsrv_oracle_0_1.Limousine_sqlsrv_oracle.runJobInTOS(Limousine_sqlsrv_oracle.java:6803)

   at test.limousine_sqlsrv_oracle_0_1.Limousine_sqlsrv_oracle.main(Limousine_sqlsrv_oracle.java:6621)

2022-04-13 13:29:35|6QHvSW|6QHvSW|6QHvSW|TEST|Limousine_sqlsrv_oracle|Default|6|Java Exception|tDBOutput_1|java.lang.ClassCastException:class java.sql.Timestamp cannot be cast to class java.sql.Date (java.sql.Timestamp and java.sql.Date are in module java.sql of loader 'platform')|1

2022-04-13 13:29:35|6QHvSW|6QHvSW|6QHvSW|66824|TEST|Limousine_sqlsrv_oracle|_distwLsDEeytAen3XqwuhQ|0.1|Default||end|success|3859

[statistics] disconnected

Job Limousine_sqlsrv_oracle ended at 13:29 13/04/2022. [Exit code = 0]

Labels (2)
1 Solution

Accepted Solutions
mboss1649680202
Contributor II
Contributor II
Author

i got the answer

 

In oracleOutput component -> advanced settings

uncheck checkbox against "Use Timestamp for Date types"

View solution in original post

2 Replies
mboss1649680202
Contributor II
Contributor II
Author

i got the answer

 

In oracleOutput component -> advanced settings

uncheck checkbox against "Use Timestamp for Date types"

DWyman1649849953
Contributor
Contributor

if you want date in different format in tMap then use schema to mention desire output format. once you convert date, then change the output date format in schema column to "dd/MM/yyyy" Talend will do all the stuff for you. you don`t need to write anything else

 

Teco Energy Login