data.validator
data.validator copied to clipboard
[Bug]: Validation without column names produces a report with failed validation
Guidelines
- [X] I agree to follow this project's Contributing Guidelines.
Project Version
No response
Platform and OS Version
No response
Existing Issues
No response
What happened?
When using the validate_cols
without supplying any column name, no warning or error is being issued. The validation report looks as follows:
Validation summary:
Number of successful validations: 0
Number of failed validations: 1
Number of validations with warnings: 0
Advanced view:
|table_name |description |type | total_violations|
|:----------|:--------------------------------------------------------------|:-----|----------------:|
|mtcars |There should not be any NAs or other missing values in columns |error | 1|
Even though there are not any NA values in the mtcars
dataset, the report suggests there was one failed validation.
Steps to reproduce
library(data.validator)
data("mtcars")
report_mtcars <- data_validation_report()
validate(mtcars, description = "Verifying cars dataset") %>%
validate_cols(description = "There aren't any NAs in the dataset", not_na) %>%
add_results(report_mtcars)
Expected behavior
I expected the code to not produce a failed validation. I expected an empty report and a warning stating that I haven't chosen any columns or a report for all the columns.
Attachments
No response
Screenshots or Videos
No response
Additional Information
No response