Open diego-oncoramedical opened 7 months ago
It looks like this is a more general error that we can't skip any error in the CLI for validating packages. In frictionless 5.17.0 with this reprex I get:
frictionless validate --skip-errors "blank-label" https://raw.githubusercontent.com/splor-mg/reprex/main/reprex/20231228T143527/datapackage.json
────────────────────────────────────────────────────────────── Dataset ───────────────────────────────────────────────────────────────
dataset
┏━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┓
┃ name ┃ type ┃ path ┃ status ┃
┡━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━┩
│ data │ table │ data.csv │ INVALID │
└──────┴───────┴──────────┴─────────┘
─────────────────────────────────────────────────────────────── Tables ───────────────────────────────────────────────────────────────
data
┏━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Row ┃ Field ┃ Type ┃ Message ┃
┡━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ None │ 2 │ blank-label │ Label in the header in field at position "2" is blank │
└──────┴───────┴─────────────┴───────────────────────────────────────────────────────┘
When I validate the data file (or a standalone resource) the check is properly skipped:
frictionless validate --skip-errors "blank-label" https://raw.githubusercontent.com/splor-mg/reprex/main/reprex/20231228T143527/data.csv
─────────────────────────────────────────────────────── Dataset ────────────────────────────────────────────────────────
dataset
┏━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┓
┃ name ┃ type ┃ path ┃ status ┃
┡━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━┩
│ data │ table │ data.csv │ VALID │
└──────┴───────┴──────────┴────────┘
Good catch. I'll change the title of the ticket to reflect this.
Overview
Edit: In my case, I only tried foreign key checks, but as @fjuniorr noted below,
--skip-errors
appears to be broken for all errors when checking a package.When validating a package using the CLI,
--skip-errors
does not appear to disable foreign key checks. Validation passes if and only if the foreign keys are commented out in each table schema file.I'm running the following command:
For the error slug, I've tried:
foreign-key
(from docs)foreign-key-error
(mentioned here)foreignKey
(from source code)foreignKeyError
(by analogy withforeign-key-error
)I've also tried all four at the same time, separated by commas with no intervening spaces.
Sample output:
Info
Environment:
App is running inside the official Python 3.12.1 Alpine Linux Docker image.
The requirements.txt file, in its entirety:
Package
The package consists of a few unremarkable CSVs:
Package JSON, presented as YAML for readability: