Timestamp Shift (TimestampShiftGenerator)
The Timestamp Shift generator shifts timestamps by a random amount of a specific unit of time within a set range.
If the generator cannot process the value, then it uses the fallback generator provided in fallbacklinks. The available options for the fallback generatorId are:
NoFallbackGenerator- Return an error. This is the default fallback option.PassthroughGeneratorConstantGeneratorNullGenerator
Link object structure
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",
"path": "string", //JSON fields only
"dataType": "string", //MongoDB, Amazon DynamoDB, and JSON fields 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 Structural 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.
Values that cannot be processed are passed through.
Last updated
Was this helpful?