CSV TO Firebase
Ultimate Fast CLI to migrate your csv data to Firebase Firestore!!!
Installation
npm i -g csv-to-firestore
Usage
Preparation
Move your CSV file and your Google Service Account (Step to get Service Accoun)
Configuration File
Before start, you have to write your own configuration file like the following template.
module.exports = {
path: 'example.csv',
firebase: {
credential: 'serviceAccount.json',
collection: 'sample',
},
mapper: (dataFromCSV) => {
return dataFromCSV
}
}
Let's Transfer!
In your Terminal or CMD run the following command.
csv-to-firestore -c <your-js-config-file> // or
csv-to-firestore --config <your-js-config-file>
Result
✔ Config File is ready !
✔ Data from CSV is ready !
✔ Firebase Admin is ready !
✔ Firebase Data Transfer Successfully !