A simple utility download and save Firestore collections as CSV file.
- In the Firebase console, open Settings > Service Accounts.
- Click Generate New Private Key, then confirm by clicking Generate Key.
- Save the JSON file with name
service-account-file.json
- Install Firebase Admin SDK:
pip install firebase-admin
- Run
./exportCSV.sh [document name]
-
--help
,-h
Displays a help message -
--output OUTPUT
,-o OUTPUT
Sets an output file to export to. '[collection]-export-[time].csv' is used if this is left out