This operator can reduce load by throwing away tuples.

Parameter

  • sampleRate: The rate elements are send (i.e. 1 means, send every element, 10 means, send every 10th element). Not to be used with timeValue.
  • timeValue: The advance of time elements are send (i.e. [ 30, 'second' ] means, send every 30 seconds) sampleRate.

Example

/// send every second element
out = SAMPLE({sampleRate = 2}, input)
 
/// send elements every second
out = SAMPLE({timeValue = [1, ‘second’]}, input)
  • No labels