What's probably the easiest way to migrate a small (< 10MB) database from SQLite to MongoDB using command line interfaces?
From what I've figured out so far it seems I'll have to do table-by-table:
> .output user.csv
> .mode csv
> .header on
> select*from user;
> .quit
> mongoimport --collection user --type csv --headerline --db rebuild user.csv
I've also done this before with a script that traversed an XML dump of an RDBMS and populated the NoSQL DB.
Both of these methods work, but they feel inelegant - surely, there's a better way to do it?
csv, you'll afaik need to add--type csvto your mongoimport command (and possibly use--headerline)--headerlinefixes the fields problem. Cheers! But I've still got to hack away table by table...no elegant export-import solution yet.mongodbsince there are no joins and you may want to make the collections more access pattern oriented.