Page 1 of 1

Null handling on timestamp fied in modifystage

Posted: Thu May 10, 2007 9:05 am
by reddy12
how can i handle null on timestamp in modify stage?
in specification properties what can i write? give suggestion.

Thanks

Posted: Thu May 10, 2007 10:23 am
by diamondabhi
Again search would be a good thing to do:

(from another post): One way nulls can be handled is

When you have this problem of dates being null and you wish to use them in routines or stage variables, it can be usefull if you have a 'special date' that is outside of the domain of your data, i.e. 9999-12-31, which you can use set null dates to using

Code:
NullToValue(input.date, StringToTimestamp('9999-12-31 00:00:00', '%yyyy-%mm-%dd %hh:%nn:%ss'))

Posted: Thu May 10, 2007 2:34 pm
by DSguru2B
A small correction here. NullToValue() will work only in the transformer stage. It wont in the modify stage. There is a mistake in the parallel guide. Use handle_null(). Search on the name for its exact syntax.

Posted: Thu May 10, 2007 6:16 pm
by reddy12
Thanks for your response DSguru2B

Can you please give me one example?
I am getting problem with that.
DATEFIELD=handle_null()
what can i specify in () ?
DSguru2B wrote:A small correction here. NullToValue() will work only in the transformer stage. It wont in the modify stage. There is a mistake in the parallel guide. Use handle_null(). Search on the name for its exact syntax.

Posted: Thu May 10, 2007 6:23 pm
by us1aslam1us
It will be same as the NullToValue.

Code: Select all

DateFiled=handle_null(FieldName, "NULL")
IHTH

Posted: Thu May 10, 2007 6:31 pm
by reddy12
I specified in properties like below
specification=DATE = handle_null(DATE," ")

I am getting the below Error.

Modify_14: Error when checking operator: When binding output schema variable "outRec": When binding output interface field "DATE" to field "DATE": Bad literal for type timestamp: .

Please help me
us1aslam1us wrote:It will be same as the NullToValue.

Code: Select all

DateFiled=handle_null(FieldName, "NULL")
IHTH

Posted: Thu May 10, 2007 6:33 pm
by us1aslam1us
Check your other post...

Posted: Thu May 10, 2007 6:38 pm
by reddy12
I checked.Thank you very much for your quick response.
us1aslam1us wrote:Check your other post...