News
Abstract
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.
Content
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: Function: seconds_since_from_timestamp2 Description: Returns the number of seconds between two timestamps Arguments: timestamp, timestamp Output: seconds (dfloat) Function: timestamp_from_seconds_since2 Description: Returns the timestamp that results from adding a number of seconds to a timestamp Arguments: seconds (dfloat), timestamp Output: timestamp Function: timestamp_from_time2 Description: Returns the timestamp that results from replacing the time of day part of the timestamp with the given time Arguments: time, timestamp Output: timestamp Function: date_from_days_since2 Description: Returns the date that results from adding a number of days to a date Arguments: days (int32), date Output: date Function: days_since_from_date2 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); |
[{"Product":{"code":"SSVSEF","label":"IBM InfoSphere DataStage"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSZJPZ","label":"IBM InfoSphere Information Server"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":" ","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21611525