Skip to content

DuckDB (CSV Upload)

GradientHarbor includes a built-in DuckDB connector that lets you upload and query CSV files directly — no external database required.

How It Works

When you create an organization, a DuckDB connector is automatically provisioned. You can then:

  1. Attach CSV files to a chat message
  2. The agent automatically summarizes the CSV (schema + sample rows)
  3. Query the data using SQL via DuckDB

This is ideal for quick analysis of spreadsheets, exported reports, or small datasets that don't live in a database.

Uploading a CSV

Via Chat

The easiest way to work with CSV files:

  1. Open a New Chat
  2. Drag and drop a CSV file onto the chat input (or click the attachment button)
  3. The file is uploaded and automatically processed:
    • Schema detected (column names and types)
    • Sample rows extracted
    • Summary saved for agent context
  4. Ask questions about the data: "What are the top 5 rows by revenue?"

What Happens Behind the Scenes

When you upload a CSV:

  1. The file is uploaded to S3 via a presigned URL
  2. GradientHarbor auto-detects the schema (column names, data types)
  3. A summary file is created with the schema and first few rows
  4. The DuckDB connector can now query the file using SQL

Limitations

  • CSV files are processed per-chat — they're available in the conversation where they were uploaded
  • Large files may take longer to process
  • Complex CSV formats (multi-line values, mixed encodings) may require pre-processing

Use Cases

  • Quick data exploration — Upload an export and ask questions immediately
  • Ad-hoc analysis — Analyze spreadsheets without setting up a database connection
  • Data validation — Compare CSV data against your connected databases
  • Prototyping — Test queries and dashboards before connecting a production database