View Categories

How to Connect DuckDB to Google Sheets – Stream Live Analytics Database Data

5 min read

CONNECTOR GUIDE

DuckDB Google Sheets

DuckDB DuckDB
Query Streams Query Streams
Google Sheets Google Sheets
Fast Analytics
Live Data
Portable

Query Streams enables you to connect DuckDB directly to Google Sheets, streaming live analytics data without Apps Script, ODBC drivers, or file uploads. Sign up for free at QueryStreams.com and start pulling live DuckDB analytics into your spreadsheets in minutes.

This guide shows you how to establish a secure, real-time connection between your DuckDB database file and Google Sheets. Perfect for data analysts, developers, and teams working with high-performance analytical databases – Query Streams makes DuckDB’s blazing-fast queries accessible from anywhere while keeping your database files secure.

File-Based Analytics

Embedded database stays local, never uploaded

OLAP Performance

Lightning-fast analytical queries on large datasets

Share Insights

Share queries without sharing database files

Query Parquet & CSV

Directly query data lake files with DuckDB

What You’ll Accomplish

By the end of this guide, you’ll be able to:

  • Connect Google Sheets to DuckDB – Fast analytical database queries
  • Query Parquet, CSV, and JSON files directly through DuckDB
  • Execute high-performance OLAP queries from Google Sheets
  • Share analytical insights without exposing database files

Prerequisites

1

Query Streams Account

Create a free account to get started with DuckDB integration.

Create Free Account →
2

Query Streams Agent Installed

Install the agent where your DuckDB file or data lake files are located.

Install the Query Streams Agent →
3

DuckDB Database File

A .duckdb or .db file accessible from the agent machine.

DuckDB Documentation →
DuckDB Advantage: DuckDB can query Parquet, CSV, and JSON files directly without importing them. Perfect for data lake analytics with Query Streams.

Step 1: Access the Query Streams Agent Interface

1
2
3
4
5
6
7

With your agent installed, configure your DuckDB connection.

  1. Open your web browser and navigate to: https://localhost:1823
  2. Navigate to Data Connections: Click Data Sources > Connections
  3. Add a new connection: Click Add Connection

Step 2: Select DuckDB as Your Connection Type

2
3
4
5
6
7
  1. Choose DuckDB: Click on the DuckDB tile (green border when selected)
  2. Alternative – Use search: Type “DuckDB” to quickly find it
  3. Click Next to proceed

Step 3: Configure Your DuckDB Connection Details

3
4
5
6
7

Required DuckDB Connection Details:

  1. Connection Name – Friendly name (e.g., “Analytics DuckDB”)
  2. Database File Path – Full path to your .duckdb file (e.g., C:\Analytics\data.duckdb). Click folder icon to browse.
  3. Default Schema (optional) – Leave blank to access all schemas
  4. Thread Count (optional) – Uses CPU count if blank
  5. Temp Directory (optional) – Custom temp file location

Once completed, click Next.

Performance Tip: DuckDB can query CSV/Parquet files directly. Use queries like SELECT * FROM 'data.parquet' LIMIT 100 for data lake analytics.

Step 4: Select Your Data Realm

4
5
6
7

Select your Data Realm – your query processing capacity.

  1. Review available realms: Based on your subscription
  2. Select realm: Choose “Default Data Realm”
  3. Click Next to test the connection

Step 5: Test Your DuckDB Connection

5
6
7

Query Streams will verify your DuckDB file is accessible.

  1. Automatic testing: Agent attempts to open the DuckDB file
  2. Review results: Success shows DuckDB version, tables, and schemas
  3. Click Next if successful
Troubleshooting: If connection fails, verify the file path is correct, file exists, and the agent has read permissions to the DuckDB file.

Step 6: Finish Setup

6
7
  1. Review configuration: Verify file path is correct
  2. Click Finish to save your DuckDB connection

Your DuckDB connection is ready! Next, install the Google Sheets add-on.

Step 7: Install Add-On and Run Your First Query

7

Install the Query Streams add-on from Google Workspace Marketplace:

After installation, open Extensions > Query Streams and create your first DuckDB query:

  1. Click “Stream a Query”
  2. Select your DuckDB connection
  3. Write your SQL query:
Example DuckDB Query SQL
SELECT 
    customer_id,
    first_name,
    last_name,
    total_spent,
    country
FROM customers
WHERE total_spent > 1000
ORDER BY total_spent DESC
LIMIT 100;
  1. Configure destination: Choose “Create a new tab”
  2. Click Play to execute

Success!

You’ve connected DuckDB to Google Sheets! Your analytics data streams instantly into a new worksheet with blazing-fast OLAP performance.

Next Steps: Save and Share Queries

Use the Query Streams web portal to build, save, and manage your DuckDB queries:

  • Save queries: Store analytical SQL for reuse
  • Add parameters: Create dynamic filters for data exploration
  • Share insights: Let stakeholders run queries without file access
  • Access from add-on: Saved queries appear in “Saved Queries” menu

Frequently Asked Questions

Does Query Streams use Google Apps Script? +

No. Query Streams uses the Google Sheets API directly for superior performance. Unlike Apps Script which has a 6-minute execution limit, Query Streams can handle DuckDB’s fast analytical queries efficiently.

🔒 Is my DuckDB database file secure? +

Yes. Your DuckDB file stays on your local machine or network. The Query Streams agent only reads query results – the database file itself is never uploaded or exposed.

💾 Can DuckDB query Parquet files directly? +

Yes! DuckDB can query Parquet, CSV, and JSON files without importing them. Use SELECT * FROM 'file.parquet' syntax in your queries for data lake analytics.

👥 Can I share queries without sharing my database file? +

Yes! Share saved queries with anyone. They can run them and get live data without ever seeing your SQL code, database file path, or having direct file access.

Why is DuckDB so fast for analytics? +

DuckDB is optimized for OLAP (analytical) workloads with columnar storage, vectorized query execution, and parallel processing. It’s ideal for aggregations, joins, and complex analytical queries on large datasets.

Updated on June 3, 2026

Powered by BetterDocs