Rollback Recordsets
Overview
Each time you run analysis on a model, PhixFlow creates a new set of data, called a recordset, for each non-transactional table. You can view this data by right-clicking on a table and selecting Show Recordsets; see Managing Recordsets for more options.
Recordsets remain available until you run an archive task on the table; see Task or rollback back the recordsets.
From the System Console → Completed Tasks tab → Recordsets you can select an option to rollback or to repeat analysis where the analysis run generated a number of cycles; see Understanding Cycles, below.
How To Rollback Recordsets
For non-transactional tables, which have a Period of Daily, Monthly or Variable, you can back out the changes to data caused by an analysis run. This resets the data to a previous recordset.
Do not roll back recordsets in transactional tables.
For tables with a Period of Transactional, individual records are updated over time. For example, application users make individual edits to records in the table. This means PhixFlow cannot rollback to a recordset in all tables where the data is consistent.
To rollback to an earlier recordset, open the rollback window from one of the following places:
- In a model: right-click on a table icon and select Rollback Table.
- In the repository: right-click on a table name and select Rollback Table.
- In the repository: use Ctrl+click to select multiple tables, right-click one of the table names and select Rollback Selected Objects.
- In a list of recordsets: select one or more recordsets, then right-click on one recordset and select Rollback Recordset. PhixFlow automatically populates the data for the rollback options, as it knows the properties of the selected recordset(s).
- In the System Console → Completed Tasks tab → Recordsets, select rollback.for a recordset.
PhixFlow opens the Rollback window where you can configure the rollback.
During the rollback process, PhixFlow displays details in the console. For large data sets, it may take some time to rollback all the data in a recordset.
Rollback Window Options
In the Rollback window, select an option and specify the recordsets to rollback.
Option | Description |
---|---|
Rollback a number of Recordsets | Enter the number of recordsets to roll back. PhixFlow removes this number of recordsets, starting with the most recent. |
Rollback to a specific run | Enter the run ID of a recordset to which you want to rollback. You can find the run IDs in Managing Recordsets. PhixFlow removes all the tables from the most recent, up to and including the specified run ID. For a transactional table, PhixFlow removes the specified run ID only. All other recordsets, even more recent ones, are retained. |
From Date | Enter a date. PhixFlow removes recordsets whose period start date is more recent than the specified date. |
Rollback all data | Phixflow removes all recordsets for this table. |
Keep old Recordsets | This box is ticked by default. Tick to rollback the data but to keep the recordset itself. In the recordset list, the recordset is empty and marked incomplete. Untick to delete the recordset. Both the data and the recordset itself are removed from the recordset list. You cannot repopulate deleted recordsets. |
Close the window without running rollback. | |
Run the rollback process, then click Yes to confirm. |
Example Rollback
When testing an analysis model it is likely you will read and clear all the data frequently, in this instance you would use the following configuration:
Understanding Repeat Cycles
Whenever an analysis model is run it will carry out a number of tasks, e.g. read a number of files, generate a number of recordsets, export a number of files.
You can configure an analysis model so that it runs several times in a single analysis session. When a model is configured in this way, each run is called a cycle. All of the items processed or generated during that cycle (i.e. the files processed, recordsets created, files exported etc.) are flagged with the cycle number. This cycle number is visible in the log file in the System Console for that analysis run on each of the relevant tabs showing files and recordsets processed.
The most common reason for configuring a model in this way is to allow a number of files to be processed in a single analysis session but to have the results from each file saved in a separate recordset. In this way, whenever a file fails to process, you can simply rollback the recordsets associated with that file rather than rolling back all of the recordsets associated with all of the files for the whole analysis session.
To configure a model to run multiple times in one analysis session:
- At the start of the model, configure the file collector to process a single file at a time.
- At the end of the model, from the final table create a push pipe that points back to the final table.
- In the push pipe, set positive offsets.
When you run analysis on the model:
- The file collector reads in one file.
- PhixFlow then processes all tables in the model, generating a recordset for each table.
- Each recordset, and any associated output file, is flagged with the cycle number 1.
- When the last table in the model has finished producing its recordset, it sends a notification to itself down the push pipe.
- Due to the positive offset in the push pipe, the notification is the signal to create another recordset, so the whole model runs again. This time, recordsets and other output files are flagged with cycle number 2.
In the log files you can see which items were processed in which cycle. For rolling back analysis runs, you can choose how many cycles to roll back. In the case where the last file processed was unsuccessful, you can choose to only roll back the last cycle.
From the System Console → Completed Tasks tab → Recordsets you can see the cycle number associated with each recordset. You have options to rollback data to repeat analysis for specific cycles.
Repopulating Incomplete Recordsets
If you rollback data due to errors, you can repopulate an incomplete recordset with the correct data. This is because all recordsets in a model that were created during the same analysis run have the same Run ID. PhixFlow can use the run ID to pull the correct data into an incomplete table.
Make sure you have corrected any problems that caused the error before repopulating the recordset with data.
To repopulate an incomplete recordset:
- Go to the console.
- Find the log messages related to rollback.
- Right-click the log message and in the Rollback window, select Repeat to reinstate data.
For information about rerunning incomplete recordsets in an transactional table; see the Managing Recordsets → Reprocess Recordset option.
Terminology changes in progress
As part of the redesign of PhixFlow, we are changing the following terms:
dashboard → screen
stream → table
stream attributes → attributes
stream item → record
stream set → recordset
stream view → view
stream item action → record-action
stream action → table-action
driver class → database driver