InfoSphere DataStage: new functions improve performance when computing timestamps and dates that are not constant
Five new functions improve performance when you are computing with timestamps and dates that vary in records that are being processed . You can use the functions in the osh script of theTransform operator and in theTransformer stage.
To improve performance, one new function replaces two timestamp arguments.
|The new functions reduce the calculation time usually required when using the following functions:
The five new functions are:
Description: Returns the number of seconds between two timestamps
Arguments: timestamp, timestamp
Output: seconds (dfloat)
Description: Returns the timestamp that results from adding a number of seconds to a timestamp
Arguments: seconds (dfloat), timestamp
Description: Returns the timestamp that results from replacing the time of day part of the timestamp with the given time
Arguments: time, timestamp
Description: Returns the date that results from adding a number of days to a date
Arguments: days (int32), date
Description: Returns the number of days between two dates
Arguments: date, date
Output: days (int32)
Previously, you might use the expression:
InterVar0_0 = ustring_from_timestamp(DSLink3.a);
DSLink4.c = seconds_since_from_timestamp(DSLink3.b , InterVar0_0);
In the preceding example, the value is explicitly converted from timestamp (binary) to ustring for use in the call to the function seconds_since_from_timestamp. Then in the function the ustring is converted back to timestamp so that the difference between the two timestamps can be computed.
With the new function, the expression is:
DSLink4.c = seconds_since_from_timestamp(DSLink3.b , DSLink3.a);
|Information Management||InfoSphere Information Server||AIX, HP-UX, Linux, Solaris, Windows||9.1|