Activating a history pipeline in Peliqan
We can implement this pattern in Peliqan with a low-code script, see below. Make sure the script is executed after each refresh of the source table, using e.g. a regular schedule or by including this in a pipeline. For example set an hourly schedule on the script when the source table is from a daily scheduled pipeline. Note: this script does not compare the historic and current record, it will fetch new and updated records incrementally (based on a timestamp) and write those to a history table.Click to see the script
Click to see the script
Viewing historic data snapshots
The history tables can be used to view historic snapshots of your data. Here’s an example of an SQL query you can use (in Peliqan or in your BI tool) to see data as it was on a given date in the past (24 December 2024 in the example below):Creating a change log
The below script can be used to generate an SQL query, that will convert a history table into a change log. The change log will list out only the columns (cells) that changed. This is useful when you have tables with many columns, to show in a condensed way which values actually changed on a given date. A change log is useful in reporting to explain e.g. changes in forecasts over time. Example of a changelog for a history table from “tickets” with columns Name, Description, Color etc:Click here to see the script
Click here to see the script
Reporting on number of history records
The below script can be used to show a report of the number of records per table and the number of history records per table.Click here to see the script
Click here to see the script
