Sampling

Most recent version: v0.0.1

circle-info

See the changelog of this Action type here.

Overview

The Sampling Action allows only a specific number of allowed events out of every set of n events to go through it.

circle-exclamation

Ports

These are the input and output ports of this Action:

chevron-rightInput portshashtag
  • Default port - All the events to be processed by this Action enter through this port.

chevron-rightOutput portshashtag
  • Default port - Events are sent through this port if no error occurs while processing them.

  • Error port - Events are sent through this port if an error occurs while processing them.

Configuration

1

Find Sampling in the Actions tab (under the Filtering group) and drag it onto the canvas. Link it to the required Listenerarrow-up-right and Data sinkarrow-up-right.

2

To open the configuration, click the Action in the canvas and select Configuration.

3

Enter the required parameters:

Parameter
Description

Allowed Events*

The number of events to sample. The first n events will be filtered from each set of total events indicated.

Total Events*

Out of how many total events that are entering the action. When the number of allowed events is filtered, a new set with this number of total events will be taken again.

4

Click Save to complete.

Example

Let's say we want to filter the first event out of each set of 3 of our input events. To do it:

1

Add the Sampling Action to your Pipeline and link it to your required Listener.

2

Now, double-click the Sampling Action to configure it. You need to set the following config:

Parameter
Description

Allowed Events

Enter 1.

Total Events

Enter 3.

3

Now link the Default output port of the Action to the input port of your Data sink.

4

Finally, click Publish and choose which clusters you want to publish the Pipeline in.

5

Click Test pipeline at the top of the area and choose a specific number of events to test if your data is transformed properly. Click Debug to proceed.

From this set of events:

We will get the following (the first event for each set of 3 events):

Last updated

Was this helpful?