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 (where the input attribute timestamp is a String based date representation):
ouput = TIMESTAMP({START = 'toLong(monthStart(toDate(timestamp,"dd.MM.yyyy")))',
                   END = 'toLong(nextMonthStart(toDate(timestamp,"dd.MM.yyyy")))'},input)

...