Comments (6)
Have you checked out csvsql in csvkit?
On Sat, Oct 12, 2013 at 5:47 AM, Alex Fink [email protected] wrote:
I just found myself using MessyTables to write a SQL "CREATE TABLE"
string. This involved converting MessyTable types to SQL query equivalents.
It would also involve trying to figure out, for example, whether something
is a varchar or a text blob.I don't see a feature that does this yet. If I branch and create it would
that be a useful contribution and in the direction MessyTables is hoping to
go?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/95
.
from messytables.
I guess I missed that. Looks very helpful. It seems like it would be less necessary to include in MessyTables then. Thanks.
from messytables.
@alexanderjfink and if you want something super-simple there's this python standard lib only script to do CSV 2 SQL for sqlite: https://gist.github.com/rgrp/5199059 (and similar code for e.g. postgres is at https://github.com/okfn/dptools/blob/master/bin/load-postgresql.py#L37)
from messytables.
I know this was closed, but I've been trying out the csvkit/csvsql recommendation. Great bit of software, but it is generally not guessing skillfully at difficult files like MessyTables seems to do. My mockup of this w/Messy worked much better at guessing the nuances of types.
from messytables.
;-) Maybe it's worth adding messytables to csvkit then.
To answer your original question. I think the idea is good but I'd like to keep messytables as slim as possible. However, you could write a program that uses messytables and generates sql and we could link to it from the wiki.
from messytables.
Thanks Dominik. That is actually what I started doing for my own needs and
I will throw it up when done. An additional reason (beyond better type
detection) I didn't want to lose using messytables was being able to
easily pull in tables from multiple types of files. Makes sense you want to
keep it slim--a link from the wiki could at least make it available to
others. Thanks again :)
On Sunday, October 13, 2013, Dominik Moritz wrote:
;-) Maybe it's worth adding messytables to csvkit then.
To answer your original question. I think the idea is good but I'd like to
keep messytables as slim as possible. However, you could write a program
that uses messytables and generates sql and we could link to it from the
wiki https://github.com/okfn/messytables/wiki.Reply to this email directly or view it on GitHubhttps://github.com//issues/95#issuecomment-26230461
.
Alex Fink
612-720-5549
[email protected]
alexfink.com
"... see I had walls all around me and I can't say enough to thank her, she
couldn't knock them down, but she tagged 'em up." - Guante
"I do not accept any absolute formulas for living. No preconceived code can
see ahead to everything that can happen in a man's life. As we live, we
grow and our beliefs change. They must change. So I think we should live
with this constant discovery. We should be open to this adventure in
heightened awareness of living. We should stake our whole existence on our
willingness to explore and experience. " -- Martin Buber
from messytables.
Related Issues (20)
- Add a sampling rate to the rowsets
- TypeError("object of type 'float' has no len()",) when calling type_guess HOT 10
- detect ods types: boolean, currency, time and percentage. support repeated column and multi-line text in a cell. HOT 1
- from six import viewkeys: cannot import name viewkeys
- Application for maintainership HOT 10
- type guessing a column of zeros (0) fails with exception
- Two fixes in reading ods format: duration correction and multi-text inside a paragraph
- Add support for Flat XML ODF Spreadsheet (.fods)
- Cell starting with a space in ods file is not parsed correctly
- Pass instantiated types to type_guess
- Potential dependency conflicts between messytables and chardet HOT 1
- Please add LICENSE
- requirements-test.txt should have xlrd==1.2.0 (or >=) for Python 3.8+ tests
- test_attempt_read_encrypted_no_password_xls failure in Python 3.7+
- messytables guesses wrong type for decimal number HOT 1
- Failure to load with Python 3.10
- headers_make_unique output not always unique
- messytables==0.15.2 is broken for python3.10 HOT 4
- Specifying true_values and false_values for Booltype
- Error in documentation example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from messytables.