Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DEV-4318 Filter option update

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.

...

If ticked, new filter conditions on this field are case-independent by default.

Note: filter conditions on the SQL Server database
FieldDescription
Basic Settings
NameThe name of the stream.
EnabledWhether or not the stream is enabled to run.
Static DataIf ticked, this stream can be used to hold static data. This is usually reference, or "look up" data used as part of a stream calculation. In technical terms, setting this means that the stream will only update itself when the user requests an analysis run on the stream directly, either ad-hoc through the user interface, or via a task plan. When this stream is part of a larger analysis run, unlike all other types of stream the stream will not attempt to update itself.
PeriodThis is the period of the stream. This can be either a regular period, or variable. There are four possible settings:
  • Transactional: allows multiple users to run independent analysis tasks at the same time.
  • Daily: generate or collect data every day.
  • Monthly: generate or collect data every month.
  • Variable: generate or collect data since the more recent run of the stream to the current date.
Stream Type

The type of function used to generate this stream. Possible types are:

Supersede Items on Pipe

You can select a "loop" pipe - that is, a pipe linking the stream back into itself - in this field. If you do, new records will be compared to existing records, using the selected loop pipe, and if a repeated record is found, the old one will be marked as 'superseded'.

Attributes
A list of the stream attributes in the stream. For each stream attribute, define the following values:
NameName of the Attribute.
TypeThis can be one of:
Length/ Precision/Significant FiguresFor a String, the maximum length of the String. For an Integer or Decimal, the maximum number of digits.
ScaleOnly applies to Decimal types. The number of digits after the decimal point; must be less than the number of significant figures.
LocalOnly tick this box if this attribute is only required as part of the stream calculation, and it is not necessary to keep the result.
Order

The order of the attributes in the stream. This is important because the stream attribute expressions are evaluated in this order. If the results of an attribute expression, or a $ variable calculated during its calculation, are required in the expression of a second attribute - the second attribute must come after the first in the attribute list.

ExpressionThe expression used to generate the attribute value. This is written as a PhixFlow Expression. It must evaluate to a single value, of the type specified in the Type field.
Advanced
IndexedTick this option if this field should be indexed in the underlying database. An indexed field should be used to increase performance on very large streams in the following situations:-
  • When 1 or more output pipes from the stream uses the field to 'Filter' the stream.
  • When 1 or more output pipes from the stream uses the field in a 'Sort/Group' by action.
Filter conditions are case-independent by default
  • the field in a 'Sort/Group' by action.
Filter conditions are case-independent by default

If ticked, new filter conditions on this field are case-insensitive by default. The filter window → Ignore Case check box inherits this setting; see Using Filters. For case-insensitive filters, there is no difference if the attribute is also indexed. 

Note

This option affects the behaviour of filters for PhixFlow instances running on Oracle or MariaDB (MySQL) databases.

For PhixFlow instances running on a SQL Server database, filters are always case-independent.
KeyFor in-memory streams, whether this field will be used as a key value. See How To: Summarise unsorted data with In Memory Streams.
Cache KeyIf a cache key is set, the value of this attribute persists throughout the stream calculation, rather than being created from scratch for each stream item as normal. This allows you to keep track of the calculation as it progresses. The cache key is an expression that is evaluated for each stream item, and of course it can use the existing value of the attribute, in other words, to value it had in the previous stream item processed in the stream calculation. This allows expressions to use the "persistent" attribute value on subsequent stream items. The expression provided in the Cache Key is evaluated for each stream item so that this "persistent" attribute can refer to multiple value keyed on the "Cache Key".
Description
DescriptionA free text description of the attribute.

Anchor
multipliers
multipliers
Multipliers and Filters

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.

Output FilterThis field is an expression which should evaluate to true or false (equivalently 1 or 0). Records created as output from the stream function can be filtered before they are written to the stream. Any attribute of the output record can be used in the expression. If an output filter expression is provided then the output record will only be written to the database if the expression evaluates to true or 1. A common pattern for example is to have an attribute on the output record (for example called 'keep') which evaluates to 1 if you wish to keep the record and 0 if you wish to discard it. The output filter expression is then _out.keep.
Actions
A list of the stream actions on the stream. See Action.
Views
A list of the views on the stream. See Stream View.
Sort Orders
A list of the sort orders on the stream. See Stream View Order.
Filters

A list of the filters on the stream. See Using Filters.

Any filter defined on the stream may appear in the dropdown list of filters accessible from the header of each stream view. To make a filter available in a view, the filter must be added to the list of filters for that view. See Stream View for details.

Inputs

A list of pipes into the stream.

Archive Settings

Anchor
keepForXDays
keepForXDays
Keep for X Days

The number of days data to keep in the stream.

When an archive task runs for a stream, all stream data is deleted if it is at least Keep for X Days old or if it is older than the Keep for Y Stream Sets most recent valid stream sets.

If both Keep for X Days and Keep for Y Stream Sets are set, stream data will be deleted only if it meets both conditions. If neither are set, stream data is kept indefinitely.

If Save Archive to File is ticked, deleted items are first saved to archive files.

The age of data in a stream set is its 'to' date relative to the 'to' date of the newest valid stream set in the stream.

See here for how to set up and schedule an Archive Task.

Please see the section below on Archiving Examples to see how this value can be used within Archiving strategies.

Keep for Y StreamSets

The number of stream sets data to keep in the stream.

See Keep for X Days for the main description of archiving.

Anchor
keepSupersededForXDays
keepSupersededForXDays
Keep Superseded for X Days

The number of days for which to keep superseded data in the stream.

If Track Superseded Data is ticked, then this field will become visible/enabled.

In a stream where the superseded date is tracked, the stream data will contain a mixture of superseded records and "active" records - that is, records that have not been superseded.

When an archive task runs for a stream, records that were marked as superseded more than Keep Superseded for X Days days or more than Keep Superseded for Y Stream Sets stream sets ago are deleted.

If both Keep Superseded for X Days and Keep Superseded for Y Stream Sets are set, superseded records will be deleted only if they meet both conditions. If neither are set, superseded records are not deleted.

This means, for example, that if you have set Keep Superseded for X Days to 4, you will be able to roll back 3 days, making the 4th day the latest valid day.

If Save Archive to File is ticked, deleted items are first saved to archive files.

Please see the section below on Archiving Superceded Examples to see how this value can be used within Archiving strategies.

Keep Superseded for Y StreamSets

The number of stream sets for which to keep superseded data in the stream.

If Track Superseded Data is ticked, then this field will become visible/enabled.

See Keep Superseded for X Days for the main description of archiving superseded records.

Save Archive to FileIf Save Archive to File is set, archived data will be written to compressed archive files before being deleted.
Apply Archive FilterIf this flag is ticked then a dialog box appears within which a filter can be created. This filter will be applied during archiving and only the records which match the filter will be archived and deleted.
Access Permissions
All Users Can View Data

If checked, this specifies that all users can view this data by default (provided they have the basic privilege to view streams).

If this field is not checked, then access to the underlying data is controlled by dropping user groups onto the stream's "User Group" tab.

Note that the default setting for this field on streams is controlled by the system parameter allowAccessToDataByDefault.

Analysis Models
A list of the analysis models that this stream appears on.
Advanced
Advanced PropertiesThe advanced properties field should only be set by, or under the guidance of, PhixFlow support.
Index Scheme 
Anchor
index_scheme
index_scheme
This determines how indexes on the Stream are organised. There are two possible settings:
  • All: indexes on the Stream are optimised for selecting from all stream sets (non-historied reads).
  • Latest: indexes on the Stream are optimised for selecting from the latest stream set (i.e. for historied reads).
  • Superseded: indexes on the Stream are optimised for self-updating streams which have a moslty superseded records.
  • None: no indexes are created on the Stream.
Storage TypeSpecifies how data for the Stream should be stored:
  • Database: Store the data in a regular table within the PhixFlow database. This is the most common option
  • Database (Partitioned): Store the data in a partitioned table within the PhixFlow database. This option provides improved performance for rollback and archiving of very large Streamsets. The option is only available if "partitioning" is available within your database installation.
  • In Memory: Data for the Stream will not be written to the database. This option can be used (for example) when you want to aggregate large amounts of unsorted data which can then be written to a stored Stream.
Start DateThe date that this stream starts. Data will be populated into the stream from this date onwards.
In Memory Cache SizeThe size of the cache that will be maintained when you are using an in-memory stream. See How To: Summarise unsorted data with In Memory Streams.
Allow Partial Set ProcessingIf ticked, when analysis reaches the end of a buffer block it submits the candidate set for processing, even if the next buffer block has a different key.
Prevent Parallel Processing

This field only appears if the Period is set to Transactional. If ticked, it ensures that only a single stream set can be generated at a time even if the stream receives several concurrent requests to generate data.

This can be useful where you want to make sure that two analysis runs don't attempt to update the same records at the same time e.g. as a result of two people selecting the same records in a view and then hitting the same action button at the same time to process those records.

Run Alone

If this flag is ticked then whenever the analysis engine needs to generate data for this stream it will first wait for all running tasks to complete before it starts.

Any additional analysis tasks submitted while this stream is waiting to start, or while it is generating data, will wait until this stream has completed its analysis before they start.

Key TolerancesWhen building a candidate set, data can be grouped together using a specific key value, e.g. Account Number. If the key value is a number, setting a key tolerance will identify numbers within the given tolerance as the the same key value.
Write in Single TransactionIf this is ticked, all of the records for a Stream Set will be written to the database in a single transaction.
Maximum Records to WriteThe maximum number of records per Stream Set if Write in Single Transaction is ticked.
Default ViewThe default view selected for the stream. See help on Views for details of creating views on streams.
Last Run Date (Read only)The date and time that analysis was last run for this stream. This date is taken from the "to date" of the most recent stream set for this stream.
Last Run ByThe user that last ran this stream.
Description

Description

A free text description field for the stream.

...