mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-29 16:39:04 +00:00
Co-authored-by: Vivek Ratnavel Subramanian <vivekratnavel90@gmail.com> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com>
311 lines
8.6 KiB
JSON
311 lines
8.6 KiB
JSON
[
|
|
{
|
|
"table": "sample_data.ecommerce_db.shopify.dim_staff",
|
|
"tableTests": [
|
|
{
|
|
"description": "Rows should always be 100 because of something",
|
|
"testCase": {
|
|
"config": {
|
|
"value": 120
|
|
},
|
|
"tableTestType": "tableRowCountToEqual"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Failed",
|
|
"result": "Found 100.0 rows vs. the expected 120"
|
|
}
|
|
},
|
|
{
|
|
"description": "Rows should always be 100 because of something",
|
|
"testCase": {
|
|
"config": {
|
|
"value": 120
|
|
},
|
|
"tableTestType": "tableRowCountToEqual"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found 120.0 rows vs. the expected 120"
|
|
}
|
|
},
|
|
{
|
|
"description": "We expect certain columns",
|
|
"testCase": {
|
|
"config": {
|
|
"value": 5
|
|
},
|
|
"tableTestType": "tableColumnCountToEqual"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found 5.0 columns vs. the expected 5"
|
|
}
|
|
},
|
|
{
|
|
"description": "Rows should always be 100 because of something",
|
|
"testCase": {
|
|
"config": {
|
|
"minValue": 100,
|
|
"maxValue": 200
|
|
},
|
|
"tableTestType": "tableRowCountToBeBetween"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found 120.0 rows vs. the expected range [100, 200]"
|
|
}
|
|
},
|
|
{
|
|
"description": "Rows should always be 100 because of something",
|
|
"testCase": {
|
|
"config": {
|
|
"minValue": 100,
|
|
"maxValue": 200
|
|
},
|
|
"tableTestType": "tableRowCountToBeBetween"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found 120.0 rows vs. the expected range [100, 200]"
|
|
}
|
|
}
|
|
],
|
|
"columnTests": [
|
|
{
|
|
"columnName": "user_id",
|
|
"description": "user_id should be positive",
|
|
"testCase": {
|
|
"config": {
|
|
"minValue": 0
|
|
},
|
|
"columnTestType": "columnValuesToBeBetween"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found min=1.0 vs. the expected min=0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "user_id",
|
|
"description": "user_id should be positive",
|
|
"testCase": {
|
|
"config": {
|
|
"minValue": 0
|
|
},
|
|
"columnTestType": "columnValuesToBeBetween"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found min=1.0 vs. the expected min=0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "email",
|
|
"description": "emails should be unique",
|
|
"testCase": {
|
|
"config": {},
|
|
"columnTestType": "columnValuesToBeUnique"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found uniqueCount=100.0 vs. valuesCount=100.0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "email",
|
|
"description": "emails should be unique",
|
|
"testCase": {
|
|
"config": {},
|
|
"columnTestType": "columnValuesToBeUnique"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found uniqueCount=100.0 vs. valuesCount=100.0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "user_id",
|
|
"description": "user_id should be not null",
|
|
"testCase": {
|
|
"config": {},
|
|
"columnTestType": "columnValuesToBeNotNull"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found nullCount=0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "user_id",
|
|
"description": "user_id should be not null",
|
|
"testCase": {
|
|
"config": {},
|
|
"columnTestType": "columnValuesToBeNotNull"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found nullCount=0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "last_name",
|
|
"description": "last_name should match a regex",
|
|
"testCase": {
|
|
"config": {
|
|
"regex": "%something%"
|
|
},
|
|
"columnTestType": "columnValuesToMatchRegex"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Failed",
|
|
"result": "Found likeCount=0. Nothing matches %something%"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "last_name",
|
|
"description": "last_name should match a regex",
|
|
"testCase": {
|
|
"config": {
|
|
"regex": "%something%"
|
|
},
|
|
"columnTestType": "columnValuesToMatchRegex"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Failed",
|
|
"result": "Found likeCount=0. Nothing matches %something%"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "first_name",
|
|
"description": "Some description...",
|
|
"testCase": {
|
|
"config": {
|
|
"missingCountValue": 10
|
|
},
|
|
"columnTestType": "columnValuesMissingCountToBeEqual"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Failed",
|
|
"result": "Found nullCount=0.0 vs. the expected nullCount=10"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "first_name",
|
|
"description": "Some description...",
|
|
"testCase": {
|
|
"config": {
|
|
"missingCountValue": 10
|
|
},
|
|
"columnTestType": "columnValuesMissingCountToBeEqual"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Failed",
|
|
"result": "Found nullCount=0.0 vs. the expected nullCount=10"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "email",
|
|
"description": "email should have a fixed length",
|
|
"testCase": {
|
|
"config": {
|
|
"minValue": 6,
|
|
"maxValue": 30
|
|
},
|
|
"columnTestType": "columnValuesToBeBetween"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found min=1.0 vs. the expected min=0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "email",
|
|
"description": "email should have a fixed length",
|
|
"testCase": {
|
|
"config": {
|
|
"minValue": 6,
|
|
"maxValue": 30
|
|
},
|
|
"columnTestType": "columnValuesToBeBetween"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found min=1.0 vs. the expected min=0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "last_name",
|
|
"description": "We have reserved last names",
|
|
"testCase": {
|
|
"config": {
|
|
"forbiddenValues": [
|
|
"forbidden",
|
|
"random"
|
|
]
|
|
},
|
|
"columnTestType": "columnValuesToBeNotInSet"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646220190,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found countInSet=0"
|
|
}
|
|
},
|
|
{
|
|
"columnName": "last_name",
|
|
"description": "We have reserved last names",
|
|
"testCase": {
|
|
"config": {
|
|
"forbiddenValues": [
|
|
"forbidden",
|
|
"random"
|
|
]
|
|
},
|
|
"columnTestType": "columnValuesToBeNotInSet"
|
|
},
|
|
"executionFrequency": "Daily",
|
|
"result": {
|
|
"timestamp": 1646221199,
|
|
"testCaseStatus": "Success",
|
|
"result": "Found countInSet=0"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|