I am adding this timestamp filed to output link of transformer. datatype timestamp 38. In the transformer, if I give default value 0 in the derivation, its giving an error saying that, invalid conversion from int8 to timestamp.
Can anybody help me?
Initialization of timestamp to zero in Px transformer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
You cannot assign a value of 0 to a timestamp. Try StringToTimeStamp('1900-01-01 00:00:00','%yyyy-%mm%-dd %hh:%nn:%ss').
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
I added column "PROCESSTIMESTAMP_MOD" data type char(10) in the output of the transformer, after that in the modify stage ( Processtimestamp_mod as input (char(10)) and processtimestamp as output, data type "TimeStamp (38) applied stringtoTimestamp function, but i got the following error.
main_program: Error parsing modify adapter: Error in binding: Unknown conversion: StringToTimeStamp
Expected destination field selector, got: ")"; input:
PROCESSTIMESTAMP : TIMESTAMP = StringToTimeStamp(1900-01-01 00:00:00,%yyyy-%mm%-dd %hh:%nn:%ss) ( PROCESSTIMESTAMP_MOD) ;
main_program: Error parsing modify adapter: Error in binding: Unknown conversion: StringToTimeStamp
Expected destination field selector, got: ")"; input:
PROCESSTIMESTAMP : TIMESTAMP = StringToTimeStamp(1900-01-01 00:00:00,%yyyy-%mm%-dd %hh:%nn:%ss) ( PROCESSTIMESTAMP_MOD) ;
Why didn't you just add the function I posted as the derivation, that will work.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
I tried StringToTimeStamp('1900-01-01 00:00:00','%yyyy-%mm%-dd %hh:%nn:%ss') in the derivation of that column. I am getting the following fatal error ,
APT_CombinedOperatorController,0: Unrecognized timestamp format identifier: %45
APT_CombinedOperatorController,0: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%yyyy-%mm%-dd %hh:%nn:%ss" for conversion "timestamp=timestamp_from_ustring[%yyyy-%mm-%dd %hh:%nn:%ss](ustring)": APT_Conversion_String_TimeStamp: Invalid Format [%yyyy-%mm%-dd %hh:%nn:%ss] used for string_from_time type conversion.
APT_CombinedOperatorController,0: Unrecognized timestamp format identifier: %45
APT_CombinedOperatorController,0: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%yyyy-%mm%-dd %hh:%nn:%ss" for conversion "timestamp=timestamp_from_ustring[%yyyy-%mm-%dd %hh:%nn:%ss](ustring)": APT_Conversion_String_TimeStamp: Invalid Format [%yyyy-%mm%-dd %hh:%nn:%ss] used for string_from_time type conversion.
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
I tried StringToTimeStamp('1900-01-01 00:00:00','%yyyy-%mm%-dd %hh:%nn:%ss') in the derivation of that column. I am getting the following fatal error ,
APT_CombinedOperatorController,0: Unrecognized timestamp format identifier: %45
APT_CombinedOperatorController,0: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%yyyy-%mm%-dd %hh:%nn:%ss" for conversion "timestamp=timestamp_from_ustring[%yyyy-%mm-%dd %hh:%nn:%ss](ustring)": APT_Conversion_String_TimeStamp: Invalid Format [%yyyy-%mm%-dd %hh:%nn:%ss] used for string_from_time type conversion.
APT_CombinedOperatorController,0: Unrecognized timestamp format identifier: %45
APT_CombinedOperatorController,0: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%yyyy-%mm%-dd %hh:%nn:%ss" for conversion "timestamp=timestamp_from_ustring[%yyyy-%mm-%dd %hh:%nn:%ss](ustring)": APT_Conversion_String_TimeStamp: Invalid Format [%yyyy-%mm%-dd %hh:%nn:%ss] used for string_from_time type conversion.