IDGeneratoris used to create an indexed ID column that you may be using as a primary key. When transforming the data, it removes the column. When reversing the the transform, it creates an indexed ID column starting at a specified counter, with any additional prefixes or suffixes you provide.
from rdt.transformers.text import IDGenerator
transformer = IDGenerator(prefix='ID_', starting_value=0, suffix='-synthetic')
prefix: A string with the prefix to use for the counter. All generated IDs will have the prefix.
starting_value: The starting value for the counter
suffix: A string with the suffix to use for the counter. All generated IDs will have the suffix.
Yes. The generated IDs start at the
starting_valueparameter, and always increment by 1 for each new ID. Since there is no maximum value, the transformer will create unique IDs. (This is useful for primary keys.)