Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate DDL SQL create table statement after scanning CSV file

Are there any command line tools (Linux, Mac, and/or Windows) that I could use to scan a delimited file and output a DDL create table statement with the data type determined for me?

Did some googling, but couldn't find anything. Was wondering if others might know, thanks!

like image 534
Vinh Nguyen Avatar asked Sep 20 '13 19:09

Vinh Nguyen


1 Answers

DDL-generator can do this. It can generate DDL's for YAML, JSON, CSV, Pickle and HTML (although I don't know how the last one works). I just tried it on some data exported from Salesforce and it worked pretty well. Note you need to use it with Python 3, I could not get it to work with Python 2.7.

like image 74
Mark Butler Avatar answered Nov 13 '22 18:11

Mark Butler