4 ms·
You can add domain-specific validations that are hard or impossible to capture with database constraints. For example, I built similar tool that you could writ
by gav 6y ago
You can add domain-specific validations that are hard or impossible to capture with database constraints.
For example, I built similar tool that you could write simple rules to validate product data. This would run every night and generate a report for the data quality team. One of the advantages was that you could decide have stricter requirements and then choose if they only applied to new products, or if the team had to go back and fix all the old products too.
Some rules I remember:
- Validating min-length, max-length, and casing of product names. Spell checking words founds.
- Verifying product images existed and where the right dimensions, below a certain file size, etc.
- Making sure that certain product categories had dimensions, and that the metric/imperial conversions were rounded in the industry-norm way (e.g. 3 3/4" was 96mm)
- Making sure that pricing/margins made sense on a vendor/product category level, to try to catch typos like $1 or $1000.
The thing I found handy was to add new rules when problems occurred that fixed historical issues.