ERRORS.md 3.11 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Errors

## frictionless errors by code

Validata transforms english frictionless error messages into
detailed french messages

- `blank-header-error`: one header name is missing
- `blank-row-error`: blank row detected
- `extra-cell-error`: supernumerary cell detected
- `type-error`: cell value doesn't conform to declared type - Validata provides
  a detailed message depending on the type to ease error fix)
- `constraint-error`: cell value doesn't conform to one or many defined [constraints](https://specs.frictionlessdata.io/table-schema/#constraints)
  - Validata provides a detailed message based on the infriged constraint(s)
  - in case of `pattern` constraint, error message content use schema field description

## Validata warnings and errors

In order to provide a better experience to tabular file providers, Validata use `sync_schema` frictionless option to ignore all errors relative to missing, misordered ou extranumerary columns.

These type of errors are reported as warnings by Validata:

- `missing-header-warn`: a column defined in the schema is not found in tabular data
- `extra-header-warn`: a column not defined in the schema is found in tabular data
- `disordered-header-warn`: column list doesn't follow schema order
  - this error is not emitted while there still missing or extra header warns

Validata handles a specific error when a missing header has a `required` contraint. In
this case, a `missing-required-header` error is reported.

### Custom checks

Validata extends frictionless, bringing additional checks (located in [custom-checks](custom-checks folder). Each check comes with or or more specific errors.

- `CohesiveColumnsValue` checks that a set of values in different columns are all empty or all valued

  - emit `cohesive-columns-value` error

- `CompareColumnsValue` compare values of two different columns using one
  operator among `<`, `<=', '==', '>=', '>')

  - emit `compare-columns-value` error

- `FrenchSirenValue` checks that a value is a valid [SIREN code](https://en.wikipedia.org/wiki/SIREN_code)

  - emit `french-siren-value` error

- `FrenchSiretValue` checks that a value is a valid [SIRET code](https://en.wikipedia.org/wiki/SIRET_code)

  - emit `french-siret-value` error

- `MissingRequiredHeader` checks that all fields with contraints `required=True` are found in tabular data

  - emit `missing-required-header` error

- `NomenclatureActesValue` checks that a value has a prefix defined in this
  [spec document](http://www.moselle.gouv.fr/content/download/1107/7994/file/nomenclature.pdf)

  - emit `nomenclature-actes-value` error

Pierre Dittgen's avatar
Pierre Dittgen committed
61
62
63
64
65
- `OpeningHoursValueError` checks that a value is a valid opening hours
  (see [spec](https://wiki.openstreetmap.org/wiki/Key:opening_hours))

  - emit `opening-hours-value` error

Pierre Dittgen's avatar
Pierre Dittgen committed
66
67
68
69
- `PhoneNumberValueError` checks that a value is a valid phone number

  - emit `phone-number-value` error

70
71
72
73
74
75
76
77
- `SumColumnsValue` checks that a field contains the sum of some other fields

  - emit `sum-columns-value` error

- `YearIntervalValue` checks that a field is formatted as 'YYYY' or 'YYYY/YYYY' with
  the second year later than the first one

  - emit `year-interval-value` error