Conversion from type "timestamp" to type "dat

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

saraswati
Premium Member
Premium Member
Posts: 149
Joined: Thu Feb 28, 2008 4:25 pm

Conversion from type "timestamp" to type "dat

Post by saraswati »

In Job1, I am getting a column CREATED_DT in an oracle table populated with current date using datastage date function CurrentDate().This column is having DATE datatype.

In Job2, this column CREATED_DT from the table which got loaded in Job1 is mapped to another column CREATED_DT in a different table having DATE as datatype.

While running the job,I am getting the following error:

Oracle_Enterprise_0: Error when checking operator: When binding output interface field "CREATED_DT" to field "CREATED_DT": No default type conversion from type "timestamp" to type "date".
Please let me know how to fix this error.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Conversion from type "timestamp" to type "

Post by SURA »

you can you to_char in select to have a specific format or you can check the type conversion function in tfm.

DS User
saraswati
Premium Member
Premium Member
Posts: 149
Joined: Thu Feb 28, 2008 4:25 pm

Post by saraswati »

Let me know what exactly needs to be done?
saraswati
Premium Member
Premium Member
Posts: 149
Joined: Thu Feb 28, 2008 4:25 pm

Post by saraswati »

can anyone help me on this to fix the error?
saraswati
Premium Member
Premium Member
Posts: 149
Joined: Thu Feb 28, 2008 4:25 pm

Post by saraswati »

When I changed the source query for the column to:

TO_CHAR(CREATE_DT,'MM/DD/YYYY')

then I am getting this error:

>##E IIS-DSEE-TFIP-00011 17:39:34(001) <Oracle_Enterprise_0> Error when checking operator: When binding output interface field "CREATE_DT" to field "CREATE_DT": No default type conversion from type "string[max=75]" to type "date".

Please help if there is any other solution.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

You are passing the char to date. When you pass the date as an input, you need to mention the date format.

1. Use view data and find the format of the date.

2. It is not a bad idea to use to_char , but in that case you might need to use StringToDate function Or you can use to_date.

DS User
saraswati
Premium Member
Premium Member
Posts: 149
Joined: Thu Feb 28, 2008 4:25 pm

Post by saraswati »

I tried using TO_DATE over TO_CHAR but still I am facing the same error.

Please suggest something different.
jiegao
Premium Member
Premium Member
Posts: 46
Joined: Fri Sep 22, 2006 6:12 pm

Post by jiegao »

Try using TO_CHAR(Create_DT, 'YYYY-MM-DD HH24:MI:SS')
saraswati
Premium Member
Premium Member
Posts: 149
Joined: Thu Feb 28, 2008 4:25 pm

Post by saraswati »

I am getting this error after using the above advice:

>##E IIS-DSEE-TFIP-00011 23:07:44(000) <Oracle_Enterprise_0> Error when checking operator: When binding output interface field "DW_CREATE_DT" to field "DW_CREATE_DT": No default type conversion from type "string[max=75]" to type "date".
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

The error says you are tying to pass the string to date value. Can't you use StringToDate function ?

DS User
rohit.ka07
Participant
Posts: 24
Joined: Thu Aug 12, 2010 11:22 pm
Location: Bangalore

Re: Conversion from type "timestamp" to type "

Post by rohit.ka07 »

Saraswathi: you said you populated current date value to a date field and the same date field you're mapping to another date field in second job. since you are mapping date field to date field you should not get this error. check in job from source side to target side whether it is populating as date only till end. also check the lenght of this field. it should be same everywhere.
ROHIT K A
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Post by suse_dk »

Read the connectivity guide for Oracle on mapping of oracle datatypes to datastage datatypes.
_________________
- Susanne
saraswati
Premium Member
Premium Member
Posts: 149
Joined: Thu Feb 28, 2008 4:25 pm

Conversion from type "timestamp" to type "dat

Post by saraswati »

I am getting this error even after using StringToDate function:

This below error is from the oracle stage:
Oracle_Enterprise_0: Error when checking operator: When binding output interface field "DW_CREATE_DT" to field "DW_CREATE_DT": No default type conversion from type "string[max=75]" to type "date".

As mentioned earlier,I populated current date value using function CurrentDate() in transformer to a date field and the same date field I am mapping to another date field in second job.Since both are mapping date field to date field there should not be an error.

It is really strange.

Can anyone take a look on it?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Conversion from type "timestamp" to type "

Post by ray.wurlod »

saraswati wrote:Can anyone take a look on it?
Of course. Your official support provider can. That's what you're paying them to do.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
saraswati
Premium Member
Premium Member
Posts: 149
Joined: Thu Feb 28, 2008 4:25 pm

Post by saraswati »

Did anyone ever faced this issue before?
Post Reply