Text Comparison Rule (text_comparison) β
Performs comparison of text values in 2 columns and creates a flag for data in a third column.
| Field | Description | Required |
|---|---|---|
reference_column | Column containing the reference values | β Yes |
comparison_column | Column containing the comparison values | β Yes |
destination_column | Column that will be populated with the matched_value or unmatched_value | β Yes |
operator | Use == to test if reference_column is equal to comparison_column. Use != to test if reference_column is not equal to comparison_column | β Yes |
matched_value | Numeric value placed in destination_column if the comparison is true. | β Yes |
unmatched_value | Numeric value placed in destination_column if the comparison is not true. | β Yes |
Example: β
json
{
"type": "text_comparison",
"reference_column": "sex",
"operator": "==",
"comparison_column": "female",
"destination_column": "sexn",
"matched_value": 1,
"unmatched_value": 0
}Behavior: If the text in sex column matches text in female column, the sexn column is populated with a 1, otherwise it is populated with a 0.