Import & Export
Import and export data as JSON, CSV, and executable seed scripts.
Overview
Stackpane supports importing and exporting data in multiple formats, making it easy to move data between environments, create backups, and seed test databases. Import and export works across all providers — Firestore documents, PostgreSQL rows, and DynamoDB items.
Exporting Data
Export as JSON
Export the current collection, table, or query results as a JSON file:
- Open the export menu from the toolbar.
- Select Export as JSON.
- Choose a save location.
The exported JSON file contains an array of records with their IDs and field data. This format is suitable for backups and data transfer between projects.
Export as CSV
Export as a CSV spreadsheet:
- Open the export menu from the toolbar.
- Select Export as CSV.
- Choose a save location.
CSV export flattens nested fields using dot notation (e.g., address.city). This format works well for analysis in spreadsheet applications.
What Gets Exported
By default, export includes all records in the current view. If you have an active query filter, only the matching records are exported. If you have records selected in multi-select mode, only the selected records are exported.
Seed Script Export
Generate executable scripts that recreate your data programmatically (available for Firestore):
- Open the export menu from the toolbar.
- Select Export as Seed Script.
- Choose the language: JavaScript (Node.js) or Python.
- Save the generated script file.
The seed script includes all data and can be run directly to populate a database. This is useful for setting up development and testing environments with realistic data.
Importing Data
Import JSON
Import records from a JSON file:
- Open the import menu from the toolbar.
- Select Import JSON and choose your file.
- Review the preview of documents to be imported.
- Click Import to create the documents.
The JSON file should be an array of objects with id and fields properties:
[
{ "id": "doc1", "fields": { "name": "Alice", "age": 30 } },
{ "id": "doc2", "fields": { "name": "Bob", "age": 25 } }
]
Import CSV
Import records from a CSV file:
- Open the import menu from the toolbar.
- Select Import CSV and choose your file.
- Review the preview with inferred types.
- Click Import to create the documents.
The CSV should have a header row with field names. An id column (if present) is used as the record identifier; otherwise, auto-generated IDs are used. Stackpane infers types for each column (string, number, boolean) automatically.
Configuration
- Default export format: Set your preferred format in Settings > Export (JSON or CSV)