Skip to content
Discussion options

You must be logged in to vote

Hmm... since I am using the config_rules_validator.py script for data quality checks. How do I ensure that the department_code column only accepts specific strings, like "ENG" or "SCI"?

How should I structure the JSON rules configuration to enforce this?

Oh... got it! I can achieve this by using the allowed_values rule type in your JSON configuration file.

An example structure is:

{
  "rules": [
    {
      "name": "valid_department_code",
      "type": "allowed_values",
      "column": "department_code",
      "values": ["ENG", "SCI"],
      "case_sensitive": true
    }
  ]
}

Replies: 1 comment

Comment options

toughdave
Mar 3, 2026
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by toughdave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
1 participant