Date Generator
This section provides a comprehensive description of the Date Generator Rule.
For a summary of the rule and its compatibility with Privitar jobs and execution environments, see Masking Rule Types.
Data Types
The supported data types for this rule are:
Date
Description
The value is replaced by a randomly generated date within a user-defined date range, using a specified format. The default format is yyyy-MM-dd
. For example:
2018-12-23
The Start of date range (inclusive) field is the earliest date that can be randomly selected within the specified range.
The End of date range (exclusive) field is the latest date that can be randomly selected within the specified range.
Masking Behavior
The options are described in the following table:
Option | Description |
---|---|
Date Format | The format of the output is specified by a Date Format string for CSV file processing. The format used is described Date and Timestamp formats. (On Avro, Parquet and Hive the natively encoded format will be retained.) |
Start of date range (inclusive) | Start of date range that is used to generate the random date. The date is inclusive. That is, it includes the specified date in the date range. (That is, a start of date range of 2020/05/03 would include 2020/05/03.) |
End of date range (exclusive) | End of date range that is used to generate the random date. The date is exclusive. That is, it excludes the specified date from the date range. (That is, a end of date range of 2020/05/03 would generate date values up to 2020/05/02.) |