Code Monkey home page Code Monkey logo

Comments (6)

pudo avatar pudo commented on August 19, 2024

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.

alexanderjfink avatar alexanderjfink commented on August 19, 2024

I guess I missed that. Looks very helpful. It seems like it would be less necessary to include in MessyTables then. Thanks.

from messytables.

rufuspollock avatar rufuspollock commented on August 19, 2024

@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.

alexanderjfink avatar alexanderjfink commented on August 19, 2024

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.

domoritz avatar domoritz commented on August 19, 2024

;-) 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.

alexanderjfink avatar alexanderjfink commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.