Timestamp Shift (TimestampShiftGenerator)

The Timestamp Shift generator shifts timestamps by a random amount of a specific unit of time within a set range.
The Timestamp Shift generator does not support linking. It can be self-consistent or consistent with another column. You cannot configure differential privacy.
The metadata object is populated from the TimestampShiftMetadata object, which includes:
  • For text source columns, the format of the datetime values in the original data.
  • For integer source columns (Unix timestamps), the unit to use.
  • The part of the timestamp to shift.
  • The minimum amount to shift the value by. Use negative numbers to move the value earlier.
  • The maximum amount to shift the value by.
"schema": "string",
"table": "string",
"column": "string",
"dataType": "string", //MongoDB only
"metadata": {
"presetId": "string",
"generatorId": "TimestampShiftGenerator",
"dateFormat": "enum", //For text source fields
"unixTimestampFormat": "enum", //For integer source fields
"datePart": "enum",
"minShiftValue": numeric,
"maxShiftValue": numeric,
"isConsistent": boolean,
"consistencyColumn": "string",
"encryptionProcessor": "x-on", //To use configured Tonic data encryption
"customValueProcessor": "string" //If custom value processor applied

Example replacement

The following example replacement for the Timestamp Shift generator updates text timestamps in the format yyyy-MM-dd. The generator shifts the day anywhere from 3 days before the current day to 3 days after the current day. The generator is consistent with the order column.
"name": "user",
"schema": "public",
"table": "events",
"links": [
"schema": "public",
"table": "events",
"column": "start",
"metadata": {
"presetId": "TimestampShiftGenerator",
"generatorId": "TimestampShiftGenerator",
"dateFormat": "yyyy-MM-dd",
"datePart": "Day",
"minShiftValue": -3,
"maxShiftValue": 3,
"isConsistent": true,
"consistencyColumn": "order"
Last modified 1mo ago