Negative
Compatibility: A single, numerical column
The Negative
constraint enforces that all the values in a given column are <0
.
Parameters
(required) column_name
: The name of the column that must follow the constraint
strict_boundaries
: Whether the column must be strictly negative, or whether 0 is allowed
True
All values in the column are <0
(default) False
All values in the column are ≤0
Example
Define your constraint using the parameters and then add it to a synthesizer.
my_constraint = {
'constraint_class': 'Negative',
'table_name': 'credit_statements', # for multi table synthesizers
'constraint_parameters': {
'column_name': 'credit_balance',
'strict': False
}
}
my_synthesizer.add_constraints(constraints=[
my_constraint
])
FAQs
Last updated