Open
Description
Under the following conditions :
- A field has the "required" constraint
- A field has the "unique" constraint
- The column is missing from the data
- Data is validated with the
--schema-sync
option
The validation raises the following Exception :
...
line 325, in row_stream
cell = row[field_name]
File "/home/pierre/Documents/multi/opendatafrance/validata/validata-table/.venv/lib/python3.10/site-packages/frictionless/table/row.py", line 73, in __missing__
return self.__process(key)
File "/home/pierre/Documents/multi/opendatafrance/validata/validata-table/.venv/lib/python3.10/site-packages/frictionless/table/row.py", line 281, in __process
raise KeyError(f"Row does not have a field {key}")
KeyError: 'Row does not have a field <name of field>'
No exception occurs if any of these conditions is removed.
Steps to reproduce
schema.json :
{
"fields": [
{
"name": "myField",
"constraints": {
"required": true,
"unique": true
}
}
]
}
data.csv :
A,B
1,2
Command :
frictionless validate --schema schema.json data.csv --schema-sync
Metadata
Metadata
Assignees
Labels
No labels