Versions Compared

Key

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

Streams are a key model component. They represent a structured store of data within PhixFlow receiving data from one or more components, processing it then storing it.

Stream Properties

Insert excerpt
_standard_settings
_standard_settings
nopaneltrue

The tab toolbar has the following additional buttons: 

Insert excerpt
_stream_sets_show
_stream_sets_show
nopaneltrue
Insert excerpt
_stream_views
_stream_views
nopaneltrue
Insert excerpt
_run_analysis
_run_analysis
nopaneltrue
.

...

The grid contains a list of the stream attributes in the stream. This section has a toolbar with standard buttons and 

Insert excerpt
_stream_show
_stream_show
nopaneltrue
 and 
Insert excerpt
_file_collector_show
_file_collector_show
nopaneltrue
.

The grid lists the attributes (data columns) in the stream data. To edit the properties of an attribute, double-click the attribute name to open the Stream Attributes properties.

...

To add an existing attribute to the list:

  1. Click 
    Insert excerpt
    _stream_show
    _stream_show
    nopaneltrue
     to list the streams available in the repository.
  2. Expand a stream to show its attributes.
  3. Drag an attribute into this list to add it. 

...

FieldDescription
Input MultiplierThe input multiplier expression should evaluate to a list of one or more values. For each value in the list, the internal variable _inputMultiplier will be set to that value and the whole stream processing will be repeated i.e. the pull pipes will be read and the data from those pipes processed to generate output stream items to be added to the current stream set. For example :

do ( $aRange = [], addElement($aRange, rng.RangeFrom), addElement($aRange, rng.RangeTo), $bRange = [], addElement($bRange, $aRange), $bRange )

Where rng.RangeFrom = 500 and rng.RangeTo = 1000, the above example evaluates to [[500,1000]], which is a list containing 1 element, which is itself a list containing 2 elements. An Input Multiplier that evaluates to [3,4,7,8] would run the Stream 4 times.
Because Input Multipliers are evaluated first in the PhixFlow Timing Cycle they are often used to look up values that can be passed to Database or other Collectors.
Output MultiplierThis field is an expression which should evaluate to an array of values. A separate output record will be produced for each value in the array and this value is available as _outputMultiplier in each of the stream output attribute expressions (each value in the array is also available through _type, although this is not recommended usage). In effect this will multiply each of the output records by the number of elements from the returned list.
For example :

ifNull(in.ASSET, [1,10,12] , // else do [5,7] )

will create 3 records for every record in the stream if in.ASSET contains a value (setting _type = 1, 10 and 12 in each case). Otherwise it will create 2 records for every record in the stream (and set _type = 5 and 7). An Output Multiplier may also evaluate to a record, or a group of records. For example an Output Multiplier with the expression:

do( lookup(lkin, $num = in.BNumber), lkin )

will return a list of records which match the lookup on the lkin pipe. In this case the required data can be extracted from the Output Multiplier using the following expression :

do ( $values = _type, $values.account_num )

If the output multiplier expression evaluates to _NULL, an empty list of values or an empty list of records then a single output record will be produced with _type set to _NULL, _NULL or an empty record respectively.

Select Records to Output

You can select a subset of records to output to the next modelling object. You select records using the data in any attribute that is  is in the stream output. Enter an expression that should evaluate to true or false (equivalently 1 or 0).  

When the expression evaluates to true or 1, the records found by the expression are selected and output to the next modelling object.

For example:

  • A stream containing data about accounts has an attribute called "active".
  • You only want to include "active" accounts in the following streams. 
  • Active accounts have the value 1.

To select active accounts, enter the expression  _out.active.
All records that have the active attribute set to any other value are ignored.

...

The grid contains a list of actions that use the stream. This section has a toolbar with standard buttons.

To edit the properties of an action, double-click the attribute name to open the Action properties.

...

The grid contains a list of actions that use the stream. This section has a toolbar with standard buttons.

To edit the properties of an action, double-click the attribute name to open the Action properties.

...

The grid contains a list of the data views for this stream. This section has a toolbar with standard buttons.

o edit the properties of an stream view, double-click the attribute name to open its Stream View properties tab.

...