Import and export
Export with Cmd/Ctrl+Shift+E.
Exporting
Exports honour the query currently in your tab. Filter to the documents you want, then export — you do not have to take the whole collection.
JSON
JSON export uses the Firestore wire format, which represents every type explicitly. This is the lossless option and the right default: a document exported to JSON and imported again is byte-for-byte the document you started with.
CSV
CSV is convenient and, on its own, lossy — a spreadsheet has no way to say “this is a timestamp with microsecond precision” or “this is an int64, not a float”.
FireFetch solves that with a tagging scheme. Non-scalar and precision-sensitive values are written with a type prefix:
@json:for structured values such as maps and arrays@ts:for timestamps
Tagged CSV round-trips losslessly. If you open it in a spreadsheet, you will see the tags — that is the tradeoff, and it is why JSON remains the better choice when nothing needs to be read by a human.
Importing
Import supports three modes:
| Mode | Behaviour |
|---|---|
| Create | Fail if a document already exists |
| Replace | Overwrite the document entirely |
| Merge | Update the fields present in the file, leave the rest alone |
Run a dry run first. It reports exactly what would be created, replaced or merged, without writing anything.
Imports require write access on the target database and are recorded in the change history, so an import that goes wrong can be undone.
Something unclear or out of date? Email[email protected].