data-peek
Features

Export

Export query results to CSV, JSON, and SQL formats

Export

Export your query results to CSV, JSON, or SQL for use in other applications. You can download the export as a file or copy the generated content directly to your clipboard.

Export Formats

CSV

Comma-separated values, compatible with:

  • Excel, Google Sheets
  • Data analysis tools
  • Import into other databases

JSON

JavaScript Object Notation, compatible with:

  • Web applications
  • APIs and data pipelines
  • Programming languages

SQL

SQL INSERT statements, compatible with:

  • Database migrations
  • Seed files
  • Moving selected result data between environments

Exporting Results

  1. Run your query
  2. Click the Export button in the results toolbar
  3. Choose your format:
    • CSV
    • JSON
    • SQL
  4. Choose Download file or Copy to clipboard

File Naming

Files are named with timestamp:

  • query_result_2024-01-15T14-30-45.csv
  • query_result_2024-01-15T14-30-45.json
  • query_result_2024-01-15T14-30-45.sql

For table previews:

  • users_2024-01-15T14-30-45.csv

CSV Format

Structure

id,name,email,created_at
1,"John Doe","john@example.com","2024-01-15T10:30:00Z"
2,"Jane Smith","jane@example.com","2024-01-15T11:45:00Z"

Features

  • Headers from column names
  • Proper quoting for special characters
  • NULL values as empty strings
  • UTF-8 encoding

JSON Format

Structure

[
  {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com",
    "created_at": "2024-01-15T10:30:00Z"
  },
  {
    "id": 2,
    "name": "Jane Smith",
    "email": "jane@example.com",
    "created_at": "2024-01-15T11:45:00Z"
  }
]

Features

  • Array of objects
  • Proper JSON types (strings, numbers, booleans)
  • NULL values as null
  • Pretty-printed for readability

SQL Format

Structure

-- Exported 2 rows from users
-- Generated at 2024-01-15T14:30:45.000Z

INSERT INTO users (id, name, email) VALUES (1, 'John Doe', 'john@example.com');
INSERT INTO users (id, name, email) VALUES (2, 'Jane Smith', 'jane@example.com');

Features

  • INSERT statements with escaped identifiers
  • SQL NULL values for missing data
  • Dialect-aware value formatting where connection context is available

Tips

  • Large exports: Export happens in memory, so very large results may be slow
  • All data: Export includes all rows from the current page
  • Encoding: Files use UTF-8 encoding
  • Clipboard: Copy uses the same generated content as file download

On this page