csv-to-firestore

1.0.0 • Public • Published

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', // Your CSV file name
    firebase: {
        credential: 'serviceAccount.json', // Your service account file name
        collection: 'sample', // target Collection in Firestore
    },
    mapper: (dataFromCSV) => { // Mapper Method as optional field
        return dataFromCSV // Return data for saving in Firestore
    }
}

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 !

Package Sidebar

Install

npm i csv-to-firestore

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

5.38 kB

Total Files

8

Last publish

Collaborators

  • reiiyuki