Open
Description
Description:
I am using Frictionless to validate CSV data with a schema, and I need to differentiate between errors and warnings based on the field type:
-
For Required Fields (e.g.,
GENDER
):- If the value is missing or does not match the enum, it should be treated as an error.
-
For Optional Fields (e.g.,
EXTENSION_SEX_AT_BIRTH_CODE_VALUE
):- If the format or enum does not match, it should be treated as a warning, not an error.
- If the value is
"male"
, it should also generate a warning instead of an error.
Schema Example (schema.json
)
{
"fields": [
{
"name": "GENDER",
"type": "string",
"description": "Bundle.entry.resource.where(resourceType ='Patient').gender",
"constraints": {
"required": true,
"enum": ["male", "female", "other", "unknown"]
}
},
{
"name": "EXTENSION_SEX_AT_BIRTH_CODE_VALUE",
"type": "string",
"description": "Bundle.entry.resource.where(resourceType ='Patient').extension.where(url='http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex').valueCode",
"constraints": {
"enum": ["f", "m", "unk"]
}
}
]
}
Expected Behavior:
Field | Issue Type | Expected Output |
---|---|---|
GENDER is empty | ❌ Error | "GENDER is required" |
GENDER is "invalid_value" | ❌ Error | "Invalid GENDER value" |
EXTENSION_SEX_AT_BIRTH_CODE_VALUE is "wrong_value" | "Invalid EXTENSION_SEX_AT_BIRTH_CODE_VALUE" |
Question:
🔹 Is there a native way in Frictionless to classify specific validation errors as warnings instead of errors?
Thanks in advance! 🚀
Metadata
Metadata
Assignees
Labels
No labels