Returns the current date and time with precision to the nanosecond of the system that hosts the Secure Agent that starts the task. The precision to which you can retrieve the date and time depends on the system that hosts the Secure Agent.
The return value of the function varies depending on how you configure the argument:
•When you configure the argument of SYSTIMESTAMP as a variable, Data Integration evaluates the function for each row in the transformation.
•When you configure the argument of SYSTIMESTAMP as a constant, Data Integration evaluates the function once and retains the value for each row in the transformation.
Syntax
SYSTIMESTAMP( [format] )
Argument
Required/
Optional
Description
format
Optional
Precision to which you want to retrieve the timestamp. You can specify precision up to seconds (SS), milliseconds (MS), microseconds (US), or nanoseconds (NS). Enclose the format string within single quotation marks. The format string is not case sensitive. For example, to display the date and time to the precision of milliseconds use the following syntax: SYSTIMESTAMP(‘MS’). Default precision is microseconds (US).
Return Value
Timestamp. Returns date and time to the specified precision. Precision dependent on platform.
Examples
Your organization has an online order service and processes real-time data. You can use the SYSTIMESTAMP function to generate a primary key for each transaction in the target database.
Create an Expression transformation with the following fields and values:
Field Name
Field Type
Expression
Customer_Name
Input
n/a
Order_Qty
Input
n/a
Time_Counter
Variable
'US'
Transaction_ID
Output
SYSTIMESTAMP (Time_Counter)
At run time, the SYSTIMESTAMP generates the system time to the precision of microseconds for each row: