FixedIncrements
Compatibility: A single, numerical column
The FixedIncrements
constraint enforces that all the values in a column are increments of a particular, fixed value. That is, all the data must be divisible by the value.
Parameters
(required) column_name
: The name of the column that must follow the constraint
(required) increment
: The size of the increment. This must be a positive integer
Example
Define your constraint using the parameters and then add it to a synthesizer.
my_constraint = {
'constraint_class': 'FixedIncrements',
'table_name': 'employees', # for multi table synthesizers
'constraint_parameters': {
'column_name': 'salary',
'increment': 1000
}
}
my_synthesizer.add_constraints(constraints=[
my_constraint
])
FAQs
Last updated