Prerequisites
- Kadoa account with API key
- SDK installed:
npm install @kadoa/node-sdk - A workflow with a schema. Rules are keyed by schema field name.
Data quality rules are currently available in the Node SDK. Python SDK support is coming soon.
Set rules for fields
Fields in the request replace their existing rules. Fields you leave out keep theirs. Every rule carrieseditedBy and editedAt, so the dashboard can show who changed it. API clients send editedBy: "user".
Rule shapes
Thekind of a field selects its rule shape and casts the field’s values to that type before evaluation.
presence and uniqueness take a target of 0, 20, 40, 60, 80, or 100 percent. A string format is one of three kinds: FREE_TEXT with a charset preset, FORMAT with a pattern preset or a custom regular expression, and LIST with a list preset or custom values. The Node SDK exports these shapes as types, starting from DataQualityRules.
Read the rules of a workflow
Remove the rules of one field
Limits
- A rule tree nests at most 4 levels deep and holds at most 200 rules.
- Workflows linked to a template inherit their rules from the template. Editing them returns
409with codeTEMPLATE_CONTROLLED_FIELD. Unlink the workflow from its template first. - Edits do not change the results of the current run. They apply from the next run on.