You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we've built up our multi-table CAG patterns, we'd like to convert our each of our existing single table constraints to use the new CAG framework.
Expected behavior
Add the Inequality CAG pattern. This CAG should inherit from the base CAG class. This CAG should copy the functionality of the existing constraint, much of _fit, _transform, and _reverse_transform should be able to be directly copied without significant logical rewrites.
Args low_column_name (str): Same as Inequality constraint high_column_name (str): Same as Inequality constraint strict_boundaries (str): Same as Inequality constraint table_name (str, optional): The name of the table to apply the CAG pattern to.
Expected Functionality
_validate_pattern_with_metadata
If no table_name is provided, the metadata must only contain a single table (this should be considered the target table)
Validate that both the low_column_name and high_column_name columns exist in the table in the metadata.
Validate that both the low_column_name and high_column_name have the same sdtype, and that it is either numerical or datetime
_validate_pattern_with_data
Validate that the inequality requirement is met between the high and low columns
_get_updated_metadata
Add the diff column to the table (by default can be '{low_column_name}#{high_column_name}')
Problem Description
As we've built up our multi-table CAG patterns, we'd like to convert our each of our existing single table constraints to use the new CAG framework.
Expected behavior
Add the
Inequality
CAG pattern. This CAG should inherit from the base CAG class. This CAG should copy the functionality of the existing constraint, much of_fit
,_transform
, and_reverse_transform
should be able to be directly copied without significant logical rewrites.Args
low_column_name (str)
: Same asInequality
constrainthigh_column_name (str)
: Same asInequality
constraintstrict_boundaries (str)
: Same asInequality
constrainttable_name (str, optional)
: The name of the table to apply the CAG pattern to.Expected Functionality
_validate_pattern_with_metadata
table_name
is provided, the metadata must only contain a single table (this should be considered the target table)low_column_name
andhigh_column_name
columns exist in the table in the metadata.low_column_name
andhigh_column_name
have the same sdtype, and that it is eithernumerical
ordatetime
_validate_pattern_with_data
_get_updated_metadata
'{low_column_name}#{high_column_name}'
)high_column_name
from the metadata._fit
_is_valid
_transform
_reverse_transform
Additional context
The text was updated successfully, but these errors were encountered: