Reputation: 81
I see we can import json files into firebase.
What I would like to know is if there is a way to import CSV files (I have files that could have about 50K or even more records with about 10 columns). Does it even make sense to have such files in firebase ?
Upvotes: 8
Views: 37606
Reputation: 1065
Here is the fastest and very comfortable tools to Import your CSV/json to Firestore and export firestore to csv/json.
https://firefoo.app/docs/firestore-export-import/export-csv
Upvotes: 0
Reputation: 21
Here is the fastest way to Import your CSV to Firestore:
Ref: https://blog.jetadmin.io/how-to-import-csv-to-firestore-database-without-code/
Upvotes: 1
Reputation: 704
One trick I used on top of all the one already mentioned is to synchronize a google spreadsheet with firebase.
You create a script that upload directly to firebase db base on row / columns. It worked quite well and can be more visual for fine tuning the raw data compared to csv/json format directly.
Ref: https://www.sohamkamani.com/blog/2017/03/09/sync-data-between-google-sheets-and-firebase/
Upvotes: 3
Reputation: 11
I've uploaded many files (tab separated files) (40MB each) into firebase. Here are the steps:
npm install firebase-import
Upvotes: 1
Reputation: 863
I can't answer if it make sense to have such files in Firebase, you should answer that.
I also had to upload CSV files to Firebase and I finally transformed my CSV into JSON and used firebase-import to add my Json into Firebase.
there's a lot of CSV to JSON converters (even online ones). You can pick the one you like the most (I personnaly used node-csvtojson).
Upvotes: 5