Make errors related to duplicate columns more explicit
When a file contains duplicate fields (fields with the exact same label), Validata sends this error: "Schema is not valid: Schemas with duplicate field names are not supported"
Example (the column notificationUE
appears twice in the CSV file):
Frictionless CLI
Exactly the same results with the latest version of frictionless (4.16.6) as well as the version currently used by Validata Core (4.10.6).
When validating the same file with the frictionless library, the correct "duplicate-label" error is reported:
frictionless validate --schema https://git.opendatafrance.net/scdl/subventions/-/raw/v2.0.1/schema.json exemple-duplicate-column.csv
# -------
# invalid: exemple-duplicate-column.csv
# -------
=== ===== ================ ========================================================================================================================================================
row field code message
=== ===== ================ ========================================================================================================================================================
15 extra-label There is an extra label "" in header at position "15"
14 duplicate-label Label "notificationUE" in the header at position "14" is duplicated to a label: at position "13"
2 14 constraint-error The cell "" in row at position "2" and field "pourcentageSubvention" at position "14" does not conform to a constraint: constraint "required" is "True"
2 15 extra-cell Row at position "2" has an extra value in field at position "15"
(...)
This error should be interpreted and translated as well in Validata UI.