timestamp_from_string conversion warnings

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

Post Reply
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

timestamp_from_string conversion warnings

Post by suresh_dsx »

Hi,

In the transformer stage, I am getting the following warning message: TransformerStage 0: Conversion error calling conversion routine timestamp_from_string data may have been lost

Source column name: FutureDate
Data type:Varchar (10) - nullable-YES
Sample data:

'1999-12-31'
'1995-10-25'


As per the below reference link, I have modified the code and it is working fine in one environment.
But when I run same in another environment, I am facing the above warning message.

viewtopic.php?t=135790&highlight=timest ... +been+lost

If Trim(NullToEmpty(link.FutureDate)) = '' Then
''
Else

StringToTimestamp(link.FutureDate : '-00-00-00', '%yyyy-%mm-%dd-%hh-%nn-%ss')

Output column: Futuredate
DataType: Timestamp Length(23) Scale(3). -Nullable -NO
Sample data:

'1999-12-31 00:00:00'
'1995-10-25 00:00:00'

Any help greatly appreciated,

Regards,
SuRi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I wonder if it might be an implicit string conversion in the transform stage. If you use the value "-12-30-30" for your time component, is your output correct or still 00:00:00?
suresh_dsx
Participant
Posts: 160
Joined: Tue May 02, 2006 7:49 am

Post by suresh_dsx »

i have got the work around on this. Now it looks fine.

Added a stage vaiable and placed the logic then used the stage variable in the derivation column. Now i am not getting the warning.


Thanks
SuRi
Post Reply