Versions Compared

Key

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

This page is for data modellers or administrators who need to manage stream data retention and deletion.

How to Configure Stream Data Retention and Deletion

...

When a data modeller creates a stream they should set up the Data Retention Settings to specify the:

...

The older data is deleted when you run a stream-data-delete task that acts on the stream; see When setting up Using Tasks and Task Plans and Task.

You can set up a stream-data-delete task , it must havewith:

  • either one or more stream addedspecific streams. You may choose to do this, for example:
    • to manage the data in several related streams
    • to run frequently on a stream that contains a large amount of data.
    • to run occasionally to manage on streams with low volumes of data that change rarely.
  • or have the All Streams option ticked. The task will run on all streams:
    • that are not in another stream-data-delete task
    • and have Data Retention Settings configured.

...

Managing Stream Sets
Anchor
archiveExamples
archiveExamples

...

The table below assumes the stream to be archived following table shows the different combinations of settings in stream properties → Data Retention Settings. It assumes that a stream currently contains 8 stream sets. Two :

  • 2 from the current

...

  • day 
  • 1 from each of the previous 6 days.

...

The values are:

  • N: a number of days
  • X: a number of stream sets
  • nullindicates no value has been entered

...

  • for this

...

  • option.

...

Tip

PhixFlow always retains the maximum number of active and superseded stream sets in the data

...

, so that no conflicting stream sets will be

...

deleted.


Archive Delete After X DaysKeeping Latest Y StreamSetsResulting Streams Archived/RetainedAction taken when stream-data-delete task runs
nullnullNo stream sets will be archived.All streams sets are retained. 
0nullAll stream sets will be archivedare deleted.
1nullThe last day of valid steam sets will be are retained. All earlier stream sets will be archivedare deleted.
In our example the 2 latest most recent stream sets will be retained with the earliest 6 older stream sets archiveddeleted.
XNnullAll stream sets which are older than X than N days before the latest valid stream set will be archivedare deleted.
null0All stream sets will be archivedare deleted.
null1The last most recent valid stream set will be is retained, all other stream sets will be archivedare deleted.
nullYXThe most recent Y X valid stream sets will be are retained, all others stream sets will be archivedare deleted.
00All stream sets will be archivedare deleted.
01The last most recent valid stream set will be is retained, all other stream sets will be archivedare deleted.
10The last day of valid steam sets will be are retained. All earlier older stream sets will be archivedare deleted.
11The last day of valid steam sets will be are retained regardless of if there are more than 1.
If there are no stream sets in the last day, then the first previous stream set will be is retained instead.
NXY

Will retain Retains the maximum number of active stream sets in the datasuch that no conflicting stream sets will be archivedare deleted.

If X N=3 ,Yand X=6 then although X says only archive delete stream sets more than 3 days old, we must keep a Y minimum of 6 stream sets. Hence the earliest oldes 2 stream sets will be archived deleted and the 6 latest most recent ones are retained.

If X N=3 ,Yand X=1 then although Y although X says only retain 1 stream set, we must retain all stream sets less than X (3) than 3 days old. Hence the earliest 4 oldest stream sets will be archived are deleted and the 4 latest most recent are retained.


Superseded Stream Sets
Anchor
archiveSupercededExamples
archiveSupercededExamples

...

In the case where only the If only  Keep Superseded for X N Days and Keep Superseded for Y X StreamSets fields are populated, the same logic in the table above will apply applies to the superseded records. Note that again archiving will always retain the maximum superseded stream sets in the data such that no conflicting stream sets will be archived.In the cases where a mixture of the full archive fields Keep for X Days, Keep for Y StreamSets' and the superseded archive fields Keep Superseded for X Days, Keep Superseded for Y StreamSets are populated, then the full archive values will be first applied and the resultant stream item records will be archived and deleted. Only then will the remaining stream sets use the Keep Superseded ... values to apply a further condition to archive and delete any remaining non qualifying

If a stream has values for all the properties

  • Keep for N Days
  • Keep for X StreamSets
  • Keep Superseded for N Days
  • Keep Superseded for X StreamSets 

then the values for stream sets are applied first, deleting full stream sets. Then the stream values for superseded records are applied to delete any remaining superseded records.