Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand the import from csv functionality to automatically create a table from the data #13

Open
copiousfreetime opened this issue Mar 27, 2011 · 1 comment
Assignees
Labels

Comments

@copiousfreetime
Copy link
Owner

Just an idea at this point. What if the importing of a csv also created the table in which to store the csv data?

@ghost
Copy link

ghost commented Nov 13, 2011

Would be a really nice feature. I'm currently working on a project were I have to get remote data from Firebird.
Then I use the data with amalgalites timeout feature in my Webapp. Currently I'm exporting each table and then importing via bash into my sqlite/amalgalite-db.
A direct data transfer/replica looks very interesting. I mean, the SEQUEL_PLUS -gem does a good job for me so far:

require 'sequel'
require 'sequel_plus'

DB = Sequel.sqlite

# Every row, every column, comma delimited double-quotes
File.open("nodes.txt", "w"){|file| DB[:nodes].export(file, :delimiter => ',', :quote_char => '"')}

Seems to be fine CSV-Data, so you could and default it does not send to File, it sends to stdout. So you could take the out directly.

@ghost ghost assigned copiousfreetime Oct 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant