Skip to content

A npm module to update database on firebase from a csv file

License

Notifications You must be signed in to change notification settings

ateev/csv-to-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv-to-firebase

A small command line tool to update firebase database on firebase from a csv file.

Installation

 npm install -g csvtofirebase

Usage

csvtofirebase <path/to/csv-file> <path/to/private-key-file> "your-database-url.firebaseio.com" <reference in firebase> <key for each csv row>

You can get your private key JSON file by going to Service Accounts tab in your project's settings page.

Example

Let's say we have a csv data file containing users information. Now we wanna store user's data at the /users reference in the database. For each item, we want the key to be userId. So the command that we'll run will be:

csvtofirebase myUsers.csv private.json "your-database-url.firebaseio.com" users memberId

This will save data in the firebase /users reference like this:

- users
  - 10001
    - name
    - userId
    - favColor
  - 10002
    - name
    - userId
    - favColor

License

License

MIT © ateev

About

A npm module to update database on firebase from a csv file

Resources

License

Stars

Watchers

Forks

Packages

No packages published