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:

  1. Open the export menu from the toolbar.
  2. Select Export as JSON.
  3. 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:

  1. Open the export menu from the toolbar.
  2. Select Export as CSV.
  3. 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):

  1. Open the export menu from the toolbar.
  2. Select Export as Seed Script.
  3. Choose the language: JavaScript (Node.js) or Python.
  4. 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:

  1. Open the import menu from the toolbar.
  2. Select Import JSON and choose your file.
  3. Review the preview of documents to be imported.
  4. 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:

  1. Open the import menu from the toolbar.
  2. Select Import CSV and choose your file.
  3. Review the preview with inferred types.
  4. 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)