Introduction
Sometimes it is necessary to split a single record into multiple records, for example if a list of values are provided in a single attribute for one record.
Scenario
A list of identifiers arrives as single stream-item containing a comma separated list, and PhixFlow wants to create a single stream-item for each element of values exist in an attribute, and we want to create a record for each item in the list. For example, the list may have come from a web service, and the identifiers need to be in separate records for further processingCreate .
The scenario we will cover in this solution will be: a stream with one element record - a comma separated list of 10 values . Process that stream into another stream such that the result is 10 stream-itemsand this will be processed such that it results in 10 records, each with a different one of the 10 values.
Customer | Products |
---|
Bob | Product 1, Product 2, Product 3... Product 10 |
Margret | Product 1 |
Solution
Solution:
- Create an output multiplier expression to parse the comma separated values into a list of 10 values
- Reference the values in that list with the
_type
internal variable.
Insert excerpt |
---|
| _terms_changing |
---|
| _terms_changing |
---|
nopanel | true |
---|
|