PhixFlow Help

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Overview

A sequence defines and caches a list of unique values that PhixFlow can then assign to items.

The curValue and nextValue functions are used to get the current and next values in the cached sequence.

Use the block size to specify the range of values in the sequence. For example, set a block size of 100 to cache 100 consecutive values. PhixFlow checks the database to determine the next available number in the sequence and then sets the next sequence of numbers as "used" in the database. The numbers are stored in the cache. When PhixFlow needs the next number in the sequence, it uses a number from the cache.

When all the values have been used, PhixFlow generates the next set of values in the sequence and saves it to the cache.  

It is much quicker for PhixFlow to retrieve a value from the cached sequence than it is to go back to the database to calculate the next number in a sequence. 

If something clears the cache, such as Tomcat being restarted, any remaining numbers in the cache are lost. This can lead to item values having gaps in the sequence. 

If you want the items to have a continuous list of sequence values, you can set the block size to 1.

For information about the properties toolbar, and about the sections Parent Details, Analysis Models, Description and Audit Summary, see Common Properties.  For a full list of all the PhixFlow property tabs and windows, see Property Tabs.

Basic Settings

FieldDescription
NameThe name of the sequence.
Start ValueThe first value in the sequence.
Block Size

For quicker performance, set the block size to a large value greater such as 100, or 10000.

To configure the sequence to generate values without any gaps in the sequence, set the block size to 1. This causes slow performance as PhixFlow has to perform database calculations for before providing the next value in the sequence.

If you require a continuous sequence of values for items, and the data set being processed is small, you may decide to accept the added overhead of calculating every value in the sequence.

If the data set is large, it is better to use a large block size, to optimise performance. If you require a continuous sequence consider an alternative method of assigning the value.

Current Value(Readonly) The highest value already allocated.

Example: Using a Sequence

To set a stream attribute to a unique order ID:

  • Create a Sequence named 'order_id'
  • Create a Stream with an Integer attribute. Set its attribute expression to:

nextValue('order_id')

Every time a new record is generated in this stream, nextValue will return a new unique value.


  • No labels