dhcole / csv-test Goto Github PK
View Code? Open in Web Editor NEWA command line application for validating CSV files
License: Other
A command line application for validating CSV files
License: Other
Perhaps something like https://github.com/isaacs/node-glob for csv-test config.yml files/*.csv
Something like a validations.js
file...
module.exports = {
customValidator: function(input) { return true; }
};
I know you wrote this to solve a simple problem of validating CSV files, but you have inadvertently created an alternative to the two existing approaches for specifying schemas for CSV files:
Remember that a schema is useful both to describe and validate data (you have the latter part). The first of these schema approaches seems to have the most momentum with apparently several tools for validating it. Most of these however are for validating the metadata specification vs. using that schema to validate the CSV. There is a tool for that, but its functionality is still pretty limited. But it's the most established schema out there for CSV. I just wish I found the functionality of the data validation tool as reliable as this one. What if I could have my cake and eat it too?!
It seems on first glance that the JSON Table Schema is mostly a subset of this one, in that it has fewer innate formats to validate against and simple constraints (no external functions), so in theory, you could also load JSON files in this format and give the world of CSV another tool for validating another schema. A few issues to figure out though:
Anyhow, I just wanted to get the discussion going. Let me know if this seems like a good idea. The one issue about using the format
field for specifying more advanced formatting rules only supported by csv-test is that the schema will vary in its rigor depending on which checking program you use. Not sure if that's considered awful or not.
via @harrisj
So, you’d have a namespaced variable in your interpolation like ‘expenses$net’ or such, if you can do this
csv-test validation.csv expenses=expenses.csv
I have a CSV with an column that can sometimes be nil. This is indicated in the CSV as an empty column (as opposed to a string like null
or nil
). It is triggering an issue with the validation for In "in" validation rule failed for input: ''
. I suspect this will also be an issue for Integer and other columns. Can we have empty column values generically default to nil before they are validated, since that is what I have usually seen (as opposed to explicit nil values)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.