by lettergram · 5y ago · 0 comments
https://github.com/capitalone/DataProfiler
We’re working to automate much of that as well in a Python library.
The end goal is to:
1. point at any dataset and load it with one command
2. Calculate statistics and identify entities with one command
3. Generate robust reports with one command.
Regarding the data wrangling... Believe it or not, even automatically detecting a delimited file with a header is hard work. Imagine a header can be on the 3rd row and has a title and author ship one rows 1 and 2 respectively. Further, the delimiter might be the “@“ symbol!
The linked library wrote handles that scenario. But that’s just CSVs, there’s also Json, parquet, Avro, etc etc...
This is an extraordinarily deep and complex field.
People always think that the hard part of automated data wrangling is things like delimiters and headers, but the real hard part of automated data wrangling is when people who aren't data wranglers themselves are making the data or when the rules or apparatus for filling cells are even the slightest bit flexible because people will always find a way to mess with you.
-delimiters
-quoting
-text encoding
-line endings
-headers
When you add in XML, JSON, fixed width etc is gets complicated fast.
So you can never guarantee to infer the data structure automatically. We just make the best guess we can and then allow the user to change those guesses and see the result in real time.
You can use a 'summary' transform to quickly summarize the data (e.g. number of blank values, min, max, numbers, dates etc).
Thanks a lot for sharing!
I do want some flexibiliy though, for example, if a certain column is filled with 9 digit numbers, starting with 0 then treat it as string.
Will have a look at it, thanks for the link!
SSIS will generate a schema for a CSV file and then let you modify any column you choose (including what you described). All it does, really, is generate the schema that the “SQL Server bulk copy” tool interprets.
It’s standard Microsoft. You can do a million things with it and it can be integrated into the entire Windows ecosystem, but go too far and you are locked in. PS, the version control experience is bad. Really bad.
For casual use, by all means use it. It’s powerful and high performance. For real production use, perhaps try to find something else.