Versions Compared

Key

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

...

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

Tab

Field

Description

General

Name

Enter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.

Description

Enter a description detailing the scope of the unit.

Input batch field

This is where you configure which field will be used as the batch value, that is to say, the field that contains the value that all the events in a batch share.

Output batch field

Name of the output field that will contain the relevant batch value.

For start events, the batch that is starting; for end events, the batch that is ending; for data events, the current batch.

Language

Specify the language you will use to write the expression in the expression fields, e.g. Javascript, Groovy, etc.

Discard expression

Enter an expression to tell the unit when to discard an event or value, for example if there is a large difference between the current value and new value. In the expression, use "currentValue" and "newValue" variables respectively.

Batch expression

Enter an expression for to obtain the batch value. If left empty, this field will only signal when the batch value changes from currentValue to newValue.

Input ports

Port

Description

in

"Normal" input events (will generate output signals if needed and then be forwarded through the data port).

signal

"Signal" input events (will generate output signals if needed, but won't be forwarded through the data port).

Output ports

Port

Description

start

Signals the start of a new batch. The output events are input events, enriched with batchIdField, containing the starting batch value.

data

Input events that are part of the current batch. The output events are input events, enriched with batchIdField, containing the starting batch value.

discarded

Input events that are discarded by the discard expression field. Output events are input events enriched with the field batchIdField, containing the starting batch value.

end

Signals when a batch ends. Events are clones of input events, enriched with batchIdField, containing the ending batch value.

error

Signals when an error occurred. Events are input events enriched with standard error fields.

Example

Imagine you have a Devo domain with users from two different countries and need to know each time users from one country or the other one are working in the domain. 

...

In the Batch Detector unit properties, you must select the country column of the table, whose values will be used to define the different batches.

...

📁 Download this example

You can try this flow by downloading this JSON and uploading it to your domain using the Import option:

...