[ 
https://issues.apache.org/jira/browse/STREAMPIPES-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17433430#comment-17433430
 ] 

Dominik Riemer commented on STREAMPIPES-449:
--------------------------------------------

This code is in the Compose pipeline element, which merges two input data 
streams. Users can select fields from each of two input data streams, which are 
merged into a single output event.

In the UI, users can select the fields.

Let's say, we have one input data stream \{"timestamp": 1234, "count": 12} and 
another input stream like \{"timestamp": 2323, "temperature": 12} and you would 
like to produce an output stream with the schema \{timestamp, count, 
temperature}.

To distinguish between the fields from each input data stream, which might have 
the same runtime name (see timestamp), a sleector prefix is internally added to 
the event. So internally, timestamp from stream one is represented with the 
prefix s0 (s0::timestamp) and from the second stream as (s1::timestamp).

The selector is automatically added based on user input in the UI. The 
getSubset method is just a helper method to extract all matching fields based 
on selected user input.

To get a better understanding, it probably helps to first start with a pipeline 
element that only requires a single input stream and then move on to elements 
that rely on two input streams.

E.g., have a look at the NumericalFilter or TextFilter components.

> Update Processing Element API in module streampipes-processors-filters-jvm
> --------------------------------------------------------------------------
>
>                 Key: STREAMPIPES-449
>                 URL: https://issues.apache.org/jira/browse/STREAMPIPES-449
>             Project: StreamPipes
>          Issue Type: Improvement
>          Components: Pipeline Elements
>            Reporter: Philipp Zehnder
>            Priority: Major
>             Fix For: 0.69.0
>
>
> The processors in this module use the old API, where 3 classes are required 
> for a single processing element. 
> These should be updated to use StreamPipesDataProcessor instead of 
> StreamPipesDataProcessor.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to