Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
themeEclipse
titleTimestamp Operator
linenumberstrue
/// Example using attributes for timestamp
output = Timestamp({year='year', month='month', day='day', hour='hour', minute='minute', second='second', millisecond='millisecond'}, input)

/// Example using date format
output = Timestamp({start='timestamp', dateformat='EEE MMM dd HH:mm:ss zzz yyyy'}, input)

/// Simulate an Expression based window:
output = Timestamp({start='start', end = 'start+1000'},input)

/// Create windows starting at distinct points in time, e.g. a "month"-based window:
ouput = TIMESTAMP({START = 'toLong(monthStart(toDate(Zeitstempeltimestamp,"dd.MM.yyyy")))',
                   END = 'toLong(nextMonthStart(toDate(Zeitstempeltimestamp,"dd.MM.yyyy")))'},input)


Remark: This operator can be used to update the end time stamp in cases where system time is used also (de.uniol.inf.is.odysseus.core.server.planmanagement.TransformationException: transformation failed ; You cannot use start and end parameters for system time processing). In this case simply use the operator with systemtime=false:

...