Skip to content

Commit

Permalink
Add library to quality
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenchrist committed Oct 27, 2024
1 parent 32ada88 commit 41b1fcf
Showing 1 changed file with 65 additions and 4 deletions.
69 changes: 65 additions & 4 deletions datacontract.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1666,6 +1666,7 @@
"description": "The type of quality check",
"enum": [
"text",
"library",
"sql",
"custom"
]
Expand All @@ -1674,10 +1675,7 @@
"type": "string",
"description": "A plain text describing the quality attribute in natural language."
}
},
"required": [
"type"
]
}
},
{
"if": {
Expand Down Expand Up @@ -1733,6 +1731,69 @@
]
}
},
{
"if": {
"properties": {
"type": {
"const": "library"
}
}
},
"then": {
"properties": {
"rule": {
"type": "string",
"description": "Define a data quality check based on the predefined rules as per ODCS.",
"examples": ["duplicateCount", "validValues", "rowCount"]
},
"mustBe": {
"description": "Must be equal to the value to be valid. When using numbers, it is equivalent to '='."
},
"mustNotBe": {
"description": "Must not be equal to the value to be valid. When using numbers, it is equivalent to '!='."
},
"mustBeGreaterThan": {
"type": "number",
"description": "Must be greater than the value to be valid. It is equivalent to '>'."
},
"mustBeGreaterOrEqualTo": {
"type": "number",
"description": "Must be greater than or equal to the value to be valid. It is equivalent to '>='."
},
"mustBeLessThan": {
"type": "number",
"description": "Must be less than the value to be valid. It is equivalent to '<'."
},
"mustBeLessOrEqualTo": {
"type": "number",
"description": "Must be less than or equal to the value to be valid. It is equivalent to '<='."
},
"mustBeBetween": {
"type": "array",
"description": "Must be between the two numbers to be valid. Smallest number first in the array.",
"minItems": 2,
"maxItems": 2,
"uniqueItems": true,
"items": {
"type": "number"
}
},
"mustNotBeBetween": {
"type": "array",
"description": "Must not be between the two numbers to be valid. Smallest number first in the array.",
"minItems": 2,
"maxItems": 2,
"uniqueItems": true,
"items": {
"type": "number"
}
}
},
"required": [
"rule"
]
}
},
{
"if": {
"properties": {
Expand Down

0 comments on commit 41b1fcf

Please sign in to comment.