History Mode (Edge)
History mode is a load mode that enables Hevo to retain every version of a record as it changes in the Source. Rather than overwriting existing rows, each change is stored as a new row in the Destination table, alongside timestamps that define the period during which that version was valid. This allows you to track how records evolve over time and identify the exact state of a record at any point.
History mode is useful when you need to:
-
Identify the state of a record on a specific date or time.
-
Track how a record has changed over time.
-
Maintain a complete audit trail for compliance, reporting, or analysis.
You can select HISTORY_TRACKING as the load mode for an object on the Configure Objects page while creating a Pipeline, if the object supports it.
Note: History load mode is currently available only for Pipelines created with Stripe as a Source.
Fields added to objects using History mode
Hevo adds the following fields to every table configured in History mode:
| Field | Data Type | Description |
__hevo__valid_from |
Timestamp | The time when the record was created or last modified in the Source. |
__hevo__valid_to |
Timestamp | The time at which this version of the record stopped being valid. For previous versions, this value is set to one millisecond before the __hevo__valid_from value of the next version, and __hevo__is_active is set to False. For the current version, the value is set to 9999-12-31 23:59:59 and __hevo__is_active is set to True to indicate it is still active. |
__hevo__is_active |
Boolean | Indicates whether this is the current active version of the record. This value is set to True for the latest version and False for all previous versions. |
Example
The following example shows how Hevo tracks changes to a subscription record with the ID sub_001 in history mode.
Initial Record Creation
When the subscription is first created, Hevo inserts the initial version of the record. Since no newer version exists, __hevo__is_active is set to True and __hevo__valid_to is set to 9999-12-31 23:59:59.
| id | status | __hevo__valid_from | __hevo__valid_to | __hevo__is_active |
|---|---|---|---|---|
| sub_001 | trialing | 2024-01-01 00:00:00 | 9999-12-31 23:59:59 | True |
Status Changes to active
When the subscription status changes, Hevo closes the previous version by updating its __hevo__valid_to value and setting __hevo__is_active to False. A new row is then inserted for the updated version.
| id | status | __hevo__valid_from | __hevo__valid_to | __hevo__is_active |
|---|---|---|---|---|
| sub_001 | trialing | 2024-01-01 00:00:00 | 2024-01-14 23:59:59 | False |
| sub_001 | active | 2024-01-15 00:00:00 | 9999-12-31 23:59:59 | True |
Status Changes to canceled
When the status changes again, Hevo repeats the process by closing the previous version and inserting a new row.
| id | status | __hevo__valid_from | __hevo__valid_to | __hevo__is_active |
|---|---|---|---|---|
| sub_001 | trialing | 2024-01-01 00:00:00 | 2024-01-14 23:59:59 | False |
| sub_001 | active | 2024-01-15 00:00:00 | 2024-03-04 23:59:59 | False |
| sub_001 | canceled | 2024-03-05 00:00:00 | 9999-12-31 23:59:59 | True |
Using these records, you can identify every historical state of sub_001 and determine the exact period during which each version was active.
If a record is deleted at the Source, Hevo closes the current version by updating its __hevo__valid_to to the deletion time and setting __hevo__is_active to False. No new row is inserted. The record’s full history remains in the Destination.
Limitations
- Schema changes on the Source, such as adding or dropping columns, may affect History mode tracking. New columns added after Pipeline creation will be tracked from the point they are added, not retroactively.