# MotherDuck Documentation > MotherDuck is a serverless cloud data warehouse built on DuckDB. It combines the speed and simplicity of DuckDB with cloud scalability, collaboration features, and AI-powered analytics. ## Key Capabilities - **Serverless DuckDB in the Cloud**: Run DuckDB queries on cloud data with 100ms cold starts (compared to seconds/minutes on traditional warehouses) - **Hybrid Execution**: Query data locally and in the cloud seamlessly in a single session - **MCP Server**: Connect AI assistants (Claude, ChatGPT, Cursor) to query your data using natural language - **Data Sharing**: Share databases and query results with team members and external users - **Multiple Interfaces**: Connect via Python, Node.js, Go, Java, JDBC, ODBC, or the web UI - **Cloud Storage Integration**: Query data directly from S3, GCS, Azure Blob Storage, and more - **AI Functions**: Built-in LLM functions for text analysis, embeddings, and SQL generation ## Getting Started - [1 - Running Your First Query](https://motherduck.com/docs/getting-started/e2e-tutorial/part-1): Learn MotherDuck and DuckDB by running your first queries on shared data - Sections: Running your first query, Next steps - [C](https://motherduck.com/docs/getting-started/interfaces/client-apis/other/c): MotherDuck + C - [DuckDB Python Client: Installation & authentication](https://motherduck.com/docs/getting-started/interfaces/client-apis/python/installation-authentication): How to install DuckDB and connect to MotherDuck - Sections: Prerequisites, Installing DuckDB, Connect to MotherDuck - [2 - Loading Your Data](https://motherduck.com/docs/getting-started/e2e-tutorial/part-2): Learn how to load your own datasets into MotherDuck - Sections: Loading your data - [Data Warehousing Overview](https://motherduck.com/docs/getting-started/data-warehouse): Learn to use MotherDuck as a Data Warehouse - Sections: Introduction to MotherDuck for data warehousing, Data ingestion, Transforming data, Sharing data, Serving data analytics, Scaling up & out for DWH use cases... - [Go](https://motherduck.com/docs/getting-started/interfaces/client-apis/other/go): MotherDuck + GoLang - [Hacker News](https://motherduck.com/docs/getting-started/sample-data-queries/hacker-news): Sample data from Hacker News stories to use for SQL querying of DuckDB and MotherDuck databases. - Sections: About the dataset, Schema, Example queries - [Specify MotherDuck database](https://motherduck.com/docs/getting-started/interfaces/client-apis/python/choose-database): Specify MotherDuck database - [3 - Sharing Your Database](https://motherduck.com/docs/getting-started/e2e-tutorial/part-3): Learn how to share your databases and collaborate with your team - Sections: Creating and sharing your data, Sharing your database, Understanding share configuration, Querying shared data, Managing Shares, Going further - [Air Quality](https://motherduck.com/docs/getting-started/sample-data-queries/air-quality): Sample data from the WHO Ambient Air Quality Database to use with DuckDB and MotherDuck - Sections: About the dataset, Example queries - [Customer-Facing Analytics Overview](https://motherduck.com/docs/getting-started/customer-facing-analytics): Build customer-facing embedded analytics with MotherDuck. Per-user isolation, sub-second SQL dashboards, and white-label analytics for SaaS—no complex infrastructure needed. - Sections: What is customer-facing analytics?, The CFA challenge, Why MotherDuck for customer-facing analytics?, Implementation patterns, FAQ - [DuckDB CLI: Installation and Connecting to MotherDuck](https://motherduck.com/docs/getting-started/interfaces/connect-query-from-duckdb-cli): Learn to connect and query databases using MotherDuck from the DuckDB CLI - Sections: Installation, Run the DuckDB CLI, Connect to MotherDuck, Accessing the MotherDuck UI from the CLI:, Upgrading MotherDuck via the DuckDB CLI: - [Java (JDBC)](https://motherduck.com/docs/getting-started/interfaces/client-apis/other/java): MotherDuck + Java - [Kaggle Movies](https://motherduck.com/docs/getting-started/sample-data-queries/kaggle-movies): A dataset of over 40,000 movies with titles, overviews, and pre-computed embeddings for semantic search. - Sections: About the dataset, How to query the dataset, Schema, Example queries - [Loading data into MotherDuck with Python](https://motherduck.com/docs/getting-started/interfaces/client-apis/python/loading-data-into-md): Load CSV, Parquet, and JSON files into MotherDuck from local, S3, or HTTPS sources using Python. - Sections: Copying a table from a local DuckDB database into MotherDuck, Copying an entire local DuckDB database to MotherDuck - [MotherDuck Web UI](https://motherduck.com/docs/getting-started/interfaces/motherduck-quick-tour): A guide to the MotherDuck Web UI — write SQL with Instant SQL, use AI to fix and edit queries, and explore your data interactively. - Sections: Getting started, Instant SQL: write SQL with real time feedback, Fix errors and edit queries with AI, Explore your results, Write queries faster, Navigate the workspace... - [Foursquare](https://motherduck.com/docs/getting-started/sample-data-queries/foursquare): Foursquare Open Source Places (FSQ OS Places) is a global, open-source dataset of over 100 million points of interest (POI) - Sections: About the dataset, Schema - [Node.js](https://motherduck.com/docs/getting-started/interfaces/client-apis/other/nodejs): MotherDuck + Node.js - [NYC 311 Complaint Data](https://motherduck.com/docs/getting-started/sample-data-queries/nyc-311-data): New York City provides data from 311 call service requests. This data can be used as sample data for DuckDB and MotherDuck SQL queries. - Sections: About the dataset, Example queries - [Postgres endpoint (thin client)](https://motherduck.com/docs/getting-started/interfaces/postgres-endpoint): Query MotherDuck from any Postgres-compatible client without installing DuckDB - Sections: Quick start with psql, Quick start with Python, Key things to know, Next steps - [Query data](https://motherduck.com/docs/getting-started/interfaces/client-apis/python/query-data): Execute SQL queries against MotherDuck using Python with hybrid local and cloud execution. - Sections: Querying data In MotherDuck, Querying data on your machine, Joining data across multiple locations, What's next ? - [Talk to Your Data with AI](https://motherduck.com/docs/getting-started/mcp-getting-started): Get started with the MotherDuck MCP Server to analyze your data using natural language with Claude, ChatGPT, and other AI assistants - Sections: What you'll learn, Prerequisites, Step 1: Add the MCP server to Claude Desktop, Step 2: Verify the connection and permissions, Step 3: List your databases, Step 4: Analyze your data... - [ODBC](https://motherduck.com/docs/getting-started/interfaces/client-apis/other/odbc): MotherDuck + ODBC - [PyPi Data](https://motherduck.com/docs/getting-started/sample-data-queries/pypi): Want to know how users find and install software you've developed for the Python Community? This DuckDB and MotherDuck database allows you to use SQL to perform data analysis on PyPi data. - Sections: About the dataset, How to query the dataset, Schema, Examples queries - [StackOverflow Data](https://motherduck.com/docs/getting-started/sample-data-queries/stackoverflow): Sample data from StackOverflow to use with DuckDB and MotherDuck to understand SQL-based data analytics. - Sections: About the dataset, How to query the dataset, Schema, Examples queries - [StackOverflow Survey Data](https://motherduck.com/docs/getting-started/sample-data-queries/stackoverflow-survey): Data from the StackOverflow Developer Survey from 2017 to 2024. - Sections: About the dataset, How to query the dataset, Schema, Examples_queries, Correlation Between Remote Work and Job Satisfaction in 2024 - [R](https://motherduck.com/docs/getting-started/interfaces/client-apis/other/r): MotherDuck + R - [Rust](https://motherduck.com/docs/getting-started/interfaces/client-apis/other/rust): MotherDuck + Rust - [WebAssembly (Wasm)](https://motherduck.com/docs/getting-started/interfaces/client-apis/other/wasm): MotherDuck + WebAssembly - [Client APIs](https://motherduck.com/docs/getting-started/interfaces/client-apis): Client APIs for MotherDuck - [Example Datasets](https://motherduck.com/docs/getting-started/sample-data-queries/datasets): A collections of open datasets and queries to get you started with DuckDB and MotherDuck - Sections: sample_data, Additional datasets, FAQ - [Getting Started](https://motherduck.com/docs/getting-started): Getting started with MotherDuck serverless cloud data warehouse. - [MotherDuck Interfaces](https://motherduck.com/docs/getting-started/interfaces): MotherDuck Offers a variety of interfaces (APIs) for integration - Sections: Client Interfaces - [MotherDuck Tutorial](https://motherduck.com/docs/getting-started/e2e-tutorial): Complete end-to-end tutorial to get started with MotherDuck and DuckDB - Sections: What You'll Learn, Prerequisites - [Other Client APIs](https://motherduck.com/docs/getting-started/interfaces/client-apis/other): Other DuckDB client APIs that work with MotherDuck - [Python](https://motherduck.com/docs/getting-started/interfaces/client-apis/python): Connect and query MotherDuck from Python ## Core Concepts - [Architecture and capabilities](https://motherduck.com/docs/concepts/architecture-and-capabilities): MotherDuck's serverless architecture combining cloud scale with DuckDB's efficiency through Dual Execution. - Sections: Summary of capabilities, Considerations and limitations - [Database Concepts](https://motherduck.com/docs/concepts/database-concepts): MotherDuck Database Concepts - Sections: MotherDuck Architectural Concepts - [Hypertenancy](https://motherduck.com/docs/concepts/hypertenancy): Learn how MotherDuck's hypertenancy model provides dedicated compute for every user through per-user Ducklings, enabling predictable performance without noisy neighbors. - Sections: The Problem with Traditional Multi-Tenancy, How Hypertenancy Works, Scaling with Hypertenancy, Hypertenancy Use Cases, Why Single-Node Beats Distributed for Per-User Compute, Related Content - [Resource management](https://motherduck.com/docs/concepts/resource-management): Understand MotherDuck's resource hierarchy, from organizations, accounts, tokens, and secrets down to databases and tables, and how each level provides compute isolation, data isolation, and access control. - Sections: The resource hierarchy, What each level means, Isolation boundaries, Common patterns, What's next, Related content - [Database Snapshots](https://motherduck.com/docs/concepts/database-snapshots): Understand how snapshots work in MotherDuck, including retention, restore, snapshot management, and plan availability - Sections: What are snapshots?, Restoring a database, Snapshot features per plan, Snapshot retention, Working with named snapshots, Historical snapshots and failsafe bytes... - [pg_duckdb Extension](https://motherduck.com/docs/concepts/pgduckdb): Use pg_duckdb to run DuckDB analytics within PostgreSQL and connect to MotherDuck. - Sections: Connect with MotherDuck - [Storage Lifecycle and Management](https://motherduck.com/docs/concepts/storage-lifecycle): Understand how MotherDuck manages data storage across different lifecycle stages and how this affects your billing and data management strategies. - Sections: Storage lifecycle overview, Storage management, Breaking down storage usage - [Data Recovery](https://motherduck.com/docs/concepts/data-recovery): Understand MotherDuck's data recovery mechanisms - Sections: Overview, Restoring Your Database to a Named Snapshot, Restoring a Database to a Historical Snapshot, See also - [Object name resolution](https://motherduck.com/docs/concepts/object-name-resolution): Fully qualified naming conventions and database resolution rules in MotherDuck. - Sections: Fully qualified naming convention, Relative naming convention - [DuckDB Extensions in MotherDuck](https://motherduck.com/docs/concepts/duckdb-extensions): Supported DuckDB extensions for the MotherDuck cloud service, Web UI, and CLI. - Sections: Extension Support, Extension Support Matrix, Future Development - [DuckLake](https://motherduck.com/docs/concepts/ducklake): Understanding DuckLake - A high-performance open table format for petabyte-scale analytics - Sections: Key characteristics, DuckLake vs. other lake formats, Use cases and applications, Performance characteristics, Data inlining, Future capabilities... - [Concepts](https://motherduck.com/docs/concepts): Concepts - [Results](https://motherduck.com/docs/concepts/results): Results - Sections: Core concepts, Interacting with results, Best practices, Notes and limitations, See also ## How-To Guides - [Connect to the MotherDuck MCP Server](https://motherduck.com/docs/key-tasks/ai-and-motherduck/mcp-setup): Set up the MotherDuck MCP Server with Claude, ChatGPT, Cursor, Claude Code, and other AI assistants - Sections: Prerequisites, Set up the remote MCP server, Configuring tool permissions, Remote vs local MCP server, Where to go from here - [From Your Local Machine](https://motherduck.com/docs/key-tasks/loading-data-into-motherduck/loading-data-from-local-machine): Moving data from local to MotherDuck through the UI or programmatically. - Sections: Single file, Multiple files or database - [Loading Data Best Practices](https://motherduck.com/docs/key-tasks/loading-data-into-motherduck/considerations-for-loading-data): Understanding trade-offs and performance implications when loading data into MotherDuck - Sections: File format considerations, Avoid single-row INSERTs, Performance optimization strategies, Duckling sizing, Summary - [Authenticating to MotherDuck](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck): Authenticate to a MotherDuck account - Sections: Manual authentication, Authentication using an access token, Using connection string parameters - [Basics database operations](https://motherduck.com/docs/key-tasks/database-operations/basics-operations): Create, list, and drop MotherDuck databases using SQL commands. - Sections: Create database, Listing databases, Delete database - [Connect via the Postgres endpoint](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint): Connect to MotherDuck using any Postgres-compatible client via the Postgres wire protocol endpoint - Sections: Before you start, Connect with psql, Connect with a URI, Secure your connection, Key things to know, Language and platform guides... - [Github Actions](https://motherduck.com/docs/key-tasks/data-warehousing/orchestration/github-action-cron): Schedule MotherDuck ETL jobs using GitHub Actions as a simple cron-based orchestrator. - Sections: Triggering GitHub Actions, Defining Jobs & Steps, Other Considerations, Handling More Complex Workflows - [Loading data to MotherDuck with Python](https://motherduck.com/docs/key-tasks/loading-data-into-motherduck/loading-data-md-python): Efficient methods for loading data from Python using DataFrames, temporary files, or bulk inserts. - Sections: 1. load data to MotherDuck with Pandas, Polars, or PyArrow, 2. write to a temporary file and load with COPY, 3. use executemany for small datasets - [Multithreading and Parallelism with Python and MotherDuck](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/multithreading-and-parallelism/multithreading-and-parallelism-python): Performance tuning via multithreading with multiple connections to MotherDuck with Python - Sections: Connections in multiple threads, Connection pooling - [PostgreSQL](https://motherduck.com/docs/key-tasks/data-warehousing/replication/postgres): Replicate PostgreSQL tables to MotherDuck using Python and the postgres_scanner extension. - Sections: Loading the PostgreSQL Exentsion & Authenticating, Connecting to MotherDuck & inserting the table, Handling More Complex Workflows - [Sharing concepts and overview](https://motherduck.com/docs/key-tasks/sharing-data/sharing-overview): MotherDuck data sharing model concepts including read-only shares and scope options. - Sections: Creating a share, Consuming shared data, Updating shared data, Consuming updated data - [Using the MotherDuck MCP Server](https://motherduck.com/docs/key-tasks/ai-and-motherduck/mcp-workflows): Effective workflows and best practices for getting the most out of the MotherDuck MCP Server with AI assistants - Sections: Prerequisites, How it works, Start with schema exploration, Frame questions with context, Iterate, Common workflow patterns... - [Connect from Python via Postgres endpoint](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint/python): Connect to MotherDuck from Python using psycopg2 or psycopg3 via the Postgres wire protocol - Sections: Prerequisites, Connect, Loading data from Python, SSL notes - [Connecting to MotherDuck](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/connecting-to-motherduck): Create one or more connections to a MotherDuck database - Sections: Connecting with the DuckDB SDK, Create a connection, Session names, Multiple connections and the database instance cache, Setting custom database instance cache time (TTL), Connect to multiple databases - [From Cloud Storage or over HTTPS](https://motherduck.com/docs/key-tasks/loading-data-into-motherduck/loading-data-from-cloud-or-https): Load data into MotherDuck from S3, Azure, GCS, or public HTTPS URLs. - Sections: From a secure cloud storage provider, Over HTTPS, Related content - [Multithreading and Parallelism with JDBC and MotherDuck](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/multithreading-and-parallelism/multithreading-and-parallelism-jdbc): Performance tuning via multithreading with multiple connections to MotherDuck with JDBC - Sections: Connections in multiple threads, Connection pooling - [Restricting to read-only access](https://motherduck.com/docs/key-tasks/ai-and-motherduck/securing-read-only-access): Restrict the remote MCP server to read-only queries using client-side blocking, read scaling tokens, or proxy filtering - Sections: Block the query_rw tool at the client, Use a read scaling token, Proxy filtering - [Setting up SSO](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/sso-setup): Configure Single Sign-On (SSO) for your MotherDuck organization using your identity provider. - Sections: How SSO works, Supported SSO configurations, Prerequisites, Setting up SSO, Just-in-Time (JIT) user provisioning, Managing members... - [Sharing data with your organization](https://motherduck.com/docs/key-tasks/sharing-data/sharing-within-org): Share databases with all members of your MotherDuck organization. - Sections: 1. Creating organization-scoped, discoverable shares, 2. Finding and consuming shares, 3. Updating shared data - [Specifying different databases](https://motherduck.com/docs/key-tasks/database-operations/specifying-different-databases): Reference tables across databases using fully qualified names with database.schema.table syntax. - [SQL Server](https://motherduck.com/docs/key-tasks/data-warehousing/replication/sql-server): Replicate SQL Server tables to MotherDuck using Python and dataframes. - Sections: SQL Server Authentication, Reading a SQL Server table into a dataframe, Inserting the table into MotherDuck, Handling More Complex Workflows - [Connect from Java via Postgres endpoint](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint/java): Connect to MotherDuck from Java using the PostgreSQL JDBC driver via the Postgres wire protocol - Sections: Prerequisites, Connect, SSL notes - [Creating Visualizations with Dives](https://motherduck.com/docs/key-tasks/ai-and-motherduck/dives): Build interactive visualizations from natural language using AI agents and the MotherDuck MCP Server - Sections: How Dives work, Prerequisites, Creating a Dive, Finding your Dives, Sharing Dives with your team, Version history... - [Dive theme gallery](https://motherduck.com/docs/key-tasks/ai-and-motherduck/dives/dive-theme-gallery): Ready-to-use theme prompts for Dives with screenshots showing each style applied to the same dataset - Sections: Tufte Minimal, Ink & Paper, Corporate Dashboard, FT Salmon, Soft Infographic, Du Bois... - [Multithreading and Parallelism with Node.js and MotherDuck](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/multithreading-and-parallelism/multithreading-and-parallelism-nodejs): Performance tuning via multithreading with multiple connections to MotherDuck with Node.js - Sections: Connection pooling - [SCIM provisioning](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/scim-provisioning): Automate user lifecycle management in MotherDuck using SCIM with your identity provider. - Sections: What is SCIM?, How SCIM complements SSO, What SCIM enables, SCIM attribute mapping, Prerequisites, Setup overview - [Sharing data with specific users](https://motherduck.com/docs/key-tasks/sharing-data/sharing-with-users): Grant read access to specific users for multi-tenant applications and collaboration. - Sections: Creating a share with restricted access (ACL), Creating hidden shares, Updating shared data - [Switching the current database](https://motherduck.com/docs/key-tasks/database-operations/switching-the-current-database): Change the active database and schema context using USE statements. - [Theming and styling your Dives](https://motherduck.com/docs/key-tasks/ai-and-motherduck/dives/theming-and-styling-dives): Control the visual appearance of your Dives with theme definitions, chart selection, and interactive filters - Sections: How theming works in Dives, Writing a theme prompt, Choosing chart types, Adding interactivity, Laying out a multi-chart Dive, Example: full theme prompt... - [Connect from Node.js via Postgres endpoint](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint/nodejs): Connect to MotherDuck from Node.js using the pg (node-postgres) library via the Postgres wire protocol - Sections: Prerequisites, Connect, SSL notes - [Load a DuckDB database into MotherDuck](https://motherduck.com/docs/key-tasks/loading-data-into-motherduck/loading-duckdb-database): Upload a local DuckDB database file to MotherDuck cloud storage. - [Managing Dives as Code](https://motherduck.com/docs/key-tasks/ai-and-motherduck/dives/managing-dives-as-code): Set up a Git-based workflow for developing, previewing, and deploying Dives with GitHub Actions and Claude Code - Sections: Quick start, Prerequisites, Pull a dive for local development, Edit locally with an AI agent, Deploy a preview with GitHub actions, Merge to production... - [Managing shares](https://motherduck.com/docs/key-tasks/sharing-data/managing-shares): View share details, modify permissions, and manage shared database access. - Sections: Getting details about a share, Listing Shares, Deleting a share, Updating a share, Editing/Altering a share - [AI Features in the MotherDuck UI](https://motherduck.com/docs/key-tasks/ai-and-motherduck/ai-features-in-ui): Use AI-powered SQL editing, FixUp, and natural language queries in the MotherDuck web interface. - Sections: Automatically Edit SQL Queries in the MotherDuck UI, Automatically Fix SQL Errors in the MotherDuck UI, Access SQL Assistant functions - [Connect from Cloudflare Workers](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint/cloudflare-workers): Query MotherDuck from Cloudflare Workers using the Postgres wire protocol - Sections: Prerequisites, Project setup, Write the Worker, Test locally, Deploy, Using Hyperdrive for connection pooling... - [Custom AI Agent Builder's Guide](https://motherduck.com/docs/key-tasks/ai-and-motherduck/building-analytics-agents): Build AI-powered analytics agents using MotherDuck's SQL functions and MCP server integration. - Sections: Prerequisites, Step 1: Define your agent's interface, Step 2: Give your agent SQL knowledge, General Knowledge, Step 3: Give your agent schema context, Step 4: Configure access controls... - [Embedding Dives in your web application](https://motherduck.com/docs/key-tasks/ai-and-motherduck/dives/embedding-dives): Embed interactive MotherDuck Dives in your web app using iframes and embed sessions - Sections: Prerequisites, How it works, Step 1: Create an embed session, Step 2: Embed the iframe, Session lifecycle, Security best practices... - [Querying Files in Amazon S3](https://motherduck.com/docs/key-tasks/cloud-storage/querying-s3-files): Query Parquet, CSV, and JSON files in S3 with automatic cloud execution routing. - Sections: Accessing private files in S3 - [Updating shares](https://motherduck.com/docs/key-tasks/sharing-data/updating-shares): Learn about data replication timing, checkpoints, and how to ensure your latest data is available in shares and read-only Ducklings. - Sections: Data replication speed, Manual share updates, Refreshing shared data (consumer side) - [Writing Data to Amazon S3](https://motherduck.com/docs/key-tasks/cloud-storage/writing-to-s3): Export data from MotherDuck to Amazon S3 or transform S3 files in place. - Sections: Syntax, Example usage - [Querying historical data with time travel](https://motherduck.com/docs/key-tasks/database-operations/time-travel): Use MotherDuck snapshots to query past database states, compare data across time periods, debug pipeline issues, reproduce reports, and create audit checkpoints. - Sections: Try it yourself: sample data setup, Core pattern: clone a point-in-time snapshot, Comparing data across time periods, Debugging data pipeline issues, Reproducing past reports, Creating audit checkpoints with named snapshots... - [Running dual execution (or hybrid) queries](https://motherduck.com/docs/key-tasks/running-hybrid-queries): Query local and cloud data together using MotherDuck's dual execution hybrid query engine. - [Copying DuckDB Databases](https://motherduck.com/docs/key-tasks/database-operations/copying-databases): Duplicate databases between MotherDuck cloud and local DuckDB using COPY FROM DATABASE. - Sections: Syntax, Example Usage - [Flat Files](https://motherduck.com/docs/key-tasks/data-warehousing/replication/flat-files): Load CSV, Parquet, and JSON files into MotherDuck from local storage or cloud sources. - Sections: CSV, JSON, Parquet, Handling more complex workflows - [From a PostgreSQL or MySQL Database](https://motherduck.com/docs/key-tasks/loading-data-into-motherduck/loading-data-from-postgres): Learn to load a table from your PostgreSQL or MySQL database into MotherDuck. - Sections: Using PostgresSQL or MySQL DuckDB Extensions, Using a MotherDuck integration Partners - [Detach and re-attach a MotherDuck database](https://motherduck.com/docs/key-tasks/database-operations/detach-and-reattach-motherduck-database): Temporarily disconnect from a MotherDuck database using DETACH and reconnect with ATTACH. - Sections: Creating, detaching, and re-attaching a database, Show All Databases - [Via the Postgres Endpoint](https://motherduck.com/docs/key-tasks/loading-data-into-motherduck/loading-data-via-postgres-endpoint): Best practices for loading data into MotherDuck efficiently when you are connected through the Postgres endpoint. - Sections: Recommended patterns, Use a DuckDB client path instead when, Protected cloud storage, Decision guide, Summary, Related pages - [Building your First App with Customer-Facing Analytics](https://motherduck.com/docs/key-tasks/customer-facing-analytics): Build customer-facing analytics applications with read scaling tokens and isolated tenant data. - Sections: Customer Provisioning, Data Modeling and Loading, Other Considerations - [Excel and Google Sheets](https://motherduck.com/docs/key-tasks/data-warehousing/replication/spreadsheets): Load Excel and Google Sheets data into MotherDuck using the DuckDB CLI. - Sections: Microsoft Excel, Google Sheets, Handling More Complex Workflows - [Attach Modes](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/attach-modes): Understand Workspace and Single attach modes - Sections: MotherDuck Attach Modes: Workspace and Single modes - [Authenticating and connecting to MotherDuck](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck): Learn how to authenticate and connect to MotherDuck - [Customer-Facing Analytics Guide (3-tier Architecture)](https://motherduck.com/docs/key-tasks/customer-facing-analytics/3-tier-cfa-guide): Step-by-step guide to building a 3-tier customer-facing analytics application with MotherDuck. - Sections: 1. understand the 3-tier CFA architecture, 2. set up your dev environment and organization, 3. create a service account for a customer company, 4. model and load customer data in MotherDuck, 5. run analytics queries from your backend, 6. scaling to many customer companies... - [Data Warehousing How-to](https://motherduck.com/docs/key-tasks/data-warehousing): Data Warehousing How-to guides - Sections: Introduction to MotherDuck for Data Warehousing, MotherDuck Basics: Concepts to Understand Before You Start, Data Ingestion: Getting Your Data In, Data Transformation: Shaping Your Data for Analysis, Orchestration: Automating Your Data Pipelines, Connecting BI Tools and Data Applications... - [Database operations](https://motherduck.com/docs/key-tasks/database-operations): Learn how to work with databases and MotherDuck - [How-to guides](https://motherduck.com/docs/key-tasks/how-to-guides): How-to guides - [Interacting with cloud storage](https://motherduck.com/docs/key-tasks/cloud-storage): Learn how to work with databases and MotherDuck - [Loading Data into MotherDuck](https://motherduck.com/docs/key-tasks/loading-data-into-motherduck): Learn how to load data into MotherDuck from various sources - Sections: Before You Start: Understanding Trade-offs - [Managing organizations](https://motherduck.com/docs/key-tasks/managing-organizations): Learn how to manage your organization with MotherDuck - Sections: Creating an organization, Inviting users to your organization, Joining an existing organization, Roles, Removing users, Limitations - [Managing Service Accounts](https://motherduck.com/docs/key-tasks/service-accounts-guide): A step-by-step guide to creating, configuring, and managing service accounts and their tokens. - Sections: Guide - Create and configure a service account, Impersonate Service Accounts (UI Only), Managing Service Accounts and Tokens - [Multithreading and parallelism](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/multithreading-and-parallelism): Learn how to use multithreading and parallelism for special cases to read data from MotherDuck - Sections: Multi-threading and parallelism in different languages - [Read Scaling](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling): Learn how to scale your data applications using read scaling tokens - Sections: Configuring a read scaling duckling pool, Ensuring data freshness, Best practices - [Sharing data in MotherDuck](https://motherduck.com/docs/key-tasks/sharing-data): Learn how to securely share data in MotherDuck - [Text Search in MotherDuck](https://motherduck.com/docs/key-tasks/ai-and-motherduck/text-search-in-motherduck): Text search strategies from pattern matching to semantic search with embeddings in MotherDuck. - Sections: Quick Start: Common Search Patterns, Refining Your Search Strategy, Search Methods, Performance Guide, Advanced Methods, Next Steps ## Integrations - [Amazon S3](https://motherduck.com/docs/integrations/cloud-storage/amazon-s3): Configure AWS S3 credentials to query files from private buckets using MotherDuck. - Sections: Configure S3 credentials, Troubleshooting, Browse buckets and files - [Apache Iceberg](https://motherduck.com/docs/integrations/file-formats/apache-iceberg): Query Apache Iceberg data and work with Iceberg REST catalogs from MotherDuck sessions using the Iceberg DuckDB extension. - Sections: Iceberg REST catalogs, Scanning individual Iceberg tables - [Azure Blob Storage](https://motherduck.com/docs/integrations/cloud-storage/azure-blob-storage): Configure Azure Blob Storage credentials to query files from private containers using MotherDuck. - Sections: Configure Azure Blob Storage credentials, Browse files in Azure Blob Storage - [BigQuery](https://motherduck.com/docs/integrations/databases/bigquery): Load data from Google BigQuery into MotherDuck using the duckdb-bigquery extension or Python SDK. - Sections: Prerequisites, 1. Using the DuckDB BigQuery Community Extension, 2. Using Google's BigQuery Python SDK - [Cloudflare R2](https://motherduck.com/docs/integrations/cloud-storage/cloudflare-r2): Configure Cloudflare R2 credentials to query files from private buckets using MotherDuck. - Sections: Configure Cloudflare R2 credentials - [Cloudflare Workers](https://motherduck.com/docs/integrations/serverless-compute/cloudflare-workers): Query MotherDuck from Cloudflare Workers using the Postgres wire protocol - Sections: Connection, Connection pooling with Hyperdrive, Tutorial - [dbt with DuckDB and MotherDuck](https://motherduck.com/docs/integrations/transformation/dbt): DuckDB and MotherDuck both support using dbt to manage data loading and transformation - Sections: Installation, Configuration for Local DuckDB, Configuration for MotherDuck, Attaching Additional Databases, Extra resources - [Delta Lake](https://motherduck.com/docs/integrations/file-formats/delta-lake): Query Delta Lake tables from MotherDuck using the Delta DuckDB extension. - Sections: Delta function, Examples - [DuckLake](https://motherduck.com/docs/integrations/file-formats/ducklake): Use DuckLake for transactional lakehouse analytics with MotherDuck-managed metadata and object storage. - Sections: Creating a fully managed DuckLake database, Data inlining, Bring your own bucket (BYOB) {#bring-your-own-bucket}, What's new in DuckLake 0.4, Performing metadata operations on a DuckLake, Current limitations - [Go driver](https://motherduck.com/docs/integrations/language-apis-and-drivers/go-driver): Connect to MotherDuck from Go applications using the go-duckdb driver. - Sections: Go gotchas - [Google Cloud Storage](https://motherduck.com/docs/integrations/cloud-storage/google-cloud-storage): Query files from private Google Cloud Storage buckets using the GCS S3-compatible connection. - Sections: Google Cloud Storage connection process, Configure Google Cloud Storage credentials, Additional resources - [Hex](https://motherduck.com/docs/integrations/bi-tools/hex): Connect Hex notebooks to MotherDuck using SQL data connections or Python cells for interactive analytics. - Sections: Using SQL cells with a data connection, Using Python cells - [JDBC driver](https://motherduck.com/docs/integrations/language-apis-and-drivers/jdbc-driver): Connect to MotherDuck from Java applications using the official DuckDB JDBC driver. - [PostgreSQL](https://motherduck.com/docs/integrations/databases/postgres): Connect MotherDuck to PostgreSQL using the postgres scanner extension or pg_duckdb for analytical queries. - [R](https://motherduck.com/docs/integrations/language-apis-and-drivers/r): Connect to MotherDuck from R for statistical analysis using the DuckDB R package. - Sections: Considerations and limitations - [Retool](https://motherduck.com/docs/integrations/dev-tools/retool): Connect Retool to MotherDuck to build internal tools and dashboards powered by your cloud data warehouse. - Sections: Retool Cloud (native connector), Self-hosted (JDBC) - [Tableau Cloud with MotherDuck](https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-cloud): Connect Tableau Cloud to MotherDuck using the Postgres endpoint for dashboards and reports. - Sections: Before you start, Connect to MotherDuck, Connection parameters, Additional information - [Vercel](https://motherduck.com/docs/integrations/web-development/vercel): Deploy MotherDuck-powered Next.js apps on Vercel using Postgres endpoint or the Wasm SDK - Sections: Native integration, Connect using the Postgres endpoint, Connect using the Wasm SDK - [PlanetScale](https://motherduck.com/docs/integrations/databases/planetscale): Connect PlanetScale Postgres to MotherDuck using pg_duckdb extension or the Postgres connector for analytical query acceleration - Sections: Prerequisites, Connecting pg_duckdb to MotherDuck, Connecting with the Postgres Extension - [Tableau Desktop and Server with MotherDuck](https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-desktop): Connect Tableau Desktop or Server to MotherDuck using the DuckDB JDBC driver and Tableau connector. - Sections: Tableau Desktop setup for DuckDB and MotherDuck, Connecting, Additional information - [Evidence](https://motherduck.com/docs/integrations/bi-tools/evidence): Build code-based data products with Evidence connected to MotherDuck using SQL and markdown. - Sections: Getting started, Authenticate to MotherDuck, Displaying some data through SQL and Markdown - [SQLAlchemy with DuckDB and MotherDuck](https://motherduck.com/docs/integrations/language-apis-and-drivers/python/sqlalchemy): Connect to MotherDuck using SQLAlchemy and the DuckDB SQLAlchemy driver for Python applications. - Sections: Install the DuckDB SQLAlchemy driver, Configuring the database connection to a local DuckDB database, Configuring the database connection to MotherDuck - [Tableau Bridge (legacy)](https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-bridge): Connect Tableau Cloud to MotherDuck using Tableau Bridge and the DuckDB JDBC connector. - Sections: How to use Tableau Cloud with MotherDuck through Tableau Bridge, Additional information - [Superset & Preset](https://motherduck.com/docs/integrations/bi-tools/superset-preset): Build dashboards with Apache Superset or Preset connected to MotherDuck via the DuckDB SQLAlchemy driver. - Sections: Superset, Preset, Related content - [DataGrip](https://motherduck.com/docs/integrations/sql-ides/datagrip): Connect JetBrains DataGrip to MotherDuck using the built-in DuckDB integration. - Sections: Connecting to MotherDuck in DataGrip, Update the DuckDB Driver Version - [DBeaver](https://motherduck.com/docs/integrations/sql-ides/dbeaver): Connect DBeaver Community to MotherDuck using the DuckDB database integration. - Sections: DBeaver DuckDB Setup, Connecting DBeaver to MotherDuck - [Hetzner Object Storage](https://motherduck.com/docs/integrations/cloud-storage/hetzner-object-storage): Configure MotherDuck to read files from Hetzner Object Storage using S3-compatible credentials. - Sections: Configure Hetzner Object Storage credentials - [Metabase](https://motherduck.com/docs/integrations/bi-tools/metabase): Connect self-hosted Metabase to MotherDuck or local DuckDB databases using the DuckDB driver plugin. - Sections: Prerequisites, Metabase Cloud, Self-hosted Metabase, Configuration Best Practices, Troubleshooting - [Tigris](https://motherduck.com/docs/integrations/cloud-storage/tigris): Query files from Tigris globally distributed object storage using MotherDuck. - Sections: Tigris requirements, Configure Tigris credentials - [Power BI with MotherDuck](https://motherduck.com/docs/integrations/bi-tools/powerbi): Connect Power BI to MotherDuck using the Postgres endpoint for dashboards and reports. - Sections: Before you start, Connect to MotherDuck, Connection parameters, Additional information - [Connect MotherDuck to Excel](https://motherduck.com/docs/integrations/bi-tools/excel): Load MotherDuck data into Excel using the DuckDB ODBC driver on Windows or export options for macOS. - Sections: Before you start, Installation steps, Excel ODBC on macOS, Tips, Troubleshooting - [Marimo](https://motherduck.com/docs/integrations/data-science-ai/marimo): Use marimo reactive notebooks with MotherDuck for interactive Python data analysis. - Sections: Getting Started, Using MotherDuck, Example Notebook - [Power BI custom connector (legacy)](https://motherduck.com/docs/integrations/bi-tools/powerbi-custom-connector): Connect Power BI to MotherDuck using the DuckDB ODBC driver and Power Query custom connector. - Sections: Installing, How to use with Power BI, Use custom data connectors with an on-premises data gateway, Additional information, Troubleshooting - [dbt cloud with MotherDuck via pg_duckdb](https://motherduck.com/docs/integrations/transformation/dbt-cloud): For dbt cloud users, pg_duckdb can be used as a shim for MotherDuck - Sections: Getting Started, Configuring pg_duckdb, dbt cloud configuration, Usage notes - [Business Intelligence Tools](https://motherduck.com/docs/integrations/bi-tools): Use MotherDuck as a data source in tools for interactive data analysis and presentation - [Cloud Storage](https://motherduck.com/docs/integrations/cloud-storage): Use MotherDuck with your favorite cloud storage services - [Creating a new integration](https://motherduck.com/docs/integrations/how-to-integrate): Guidelines for integrating your application with MotherDuck, including connection strings and custom user agent configuration. - Sections: Language and framework examples {#custom-user-agent-examples}, Implementation best practices - [Data Quality Tools](https://motherduck.com/docs/integrations/data-quality): Monitor and maintain data quality in MotherDuck - [Data Science & AI](https://motherduck.com/docs/integrations/data-science-ai): Use MotherDuck with your favorite data science and AI tools - [Data Transformation](https://motherduck.com/docs/integrations/transformation): Transform your data inside MotherDuck - [databases](https://motherduck.com/docs/integrations/databases): Use MotherDuck with your favorite databases - [Development Tools](https://motherduck.com/docs/integrations/dev-tools): Developer tools and utilities that work with MotherDuck - [dlt (data load tool)](https://motherduck.com/docs/integrations/ingestion/dlt): Use dlt to extract and load data from APIs and databases into MotherDuck with automatic schema inference. - Sections: Authentication, Minimal example - [File Formats](https://motherduck.com/docs/integrations/file-formats): Load data into MotherDuck using various file formats - [Ingestion](https://motherduck.com/docs/integrations/ingestion): Configure MotherDuck as the destination for your data in the following data ingestion tools - [Integrations](https://motherduck.com/docs/integrations): Integrations that work with MotherDuck from the modern data stack - Sections: Supported Integrations, Diagram: Modern Duck Stack - [Language APIs & Drivers](https://motherduck.com/docs/integrations/language-apis-and-drivers): Connect to MotherDuck using your preferred programming language - [Orchestration](https://motherduck.com/docs/integrations/orchestration): Orchestrate data pipelines with MotherDuck - [Python](https://motherduck.com/docs/integrations/language-apis-and-drivers/python/python-overview): Connect to MotherDuck using Python - [Reverse ETL](https://motherduck.com/docs/integrations/reverse-etl): Reverse ETL tools and utilities that work with MotherDuck - [Serverless Compute](https://motherduck.com/docs/integrations/serverless-compute): Connect to MotherDuck from serverless and edge compute platforms - [SQL IDEs](https://motherduck.com/docs/integrations/sql-ides): Use MotherDuck with your favorite SQL development environments - [Streamkap](https://motherduck.com/docs/integrations/ingestion/streamkap): Stream Change Data Capture (CDC) events from databases into MotherDuck via S3 using Streamkap. - Sections: Configure the S3 Source in MotherDuck, Query Data from the S3 Bucket - [Tableau](https://motherduck.com/docs/integrations/bi-tools/tableau): Connect Tableau Cloud, Desktop, or Server to MotherDuck for interactive dashboards and reports. - [Web Development](https://motherduck.com/docs/integrations/web-development): Build web applications with MotherDuck ## SQL Reference - [AI Functions](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions): MotherDuck AI SQL functions for text generation, embeddings, and SQL assistance. - Sections: Available Functions - [Dives Functions](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives): SQL table functions for creating, reading, updating, and deleting MotherDuck Dives. - Sections: Available functions - [MCP Server](https://motherduck.com/docs/sql-reference/mcp): Connect AI assistants to MotherDuck using the remote (fully managed) or local (fully customizable) MCP server - Sections: Server capabilities, Local MCP server, Related resources - [MotherDuck REST API](https://motherduck.com/docs/sql-reference/rest-api/motherduck-rest-api): REST API reference for managing MotherDuck resources including databases, users, and access tokens. - [PROMPT_EXPLAIN](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/prompt-explain): Get AI-generated explanations of SQL queries using the PROMPT_EXPLAIN function. - Sections: Explain a query - [PROMPT_FIX_LINE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/prompt-fix-line): Fix SQL query errors line by line using the PROMPT_FIX_LINE function. - Sections: Fix your query line-by-line - [PROMPT_FIXUP](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/prompt-fixup): Automatically fix SQL query errors using the PROMPT_FIXUP function. - Sections: Fix up your query - [PROMPT_QUERY](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/prompt-query): Answer natural language questions about your data using the PROMPT_QUERY function. - Sections: Answer questions about your data - [PROMPT_SCHEMA](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/prompt-schema): Describe database contents using the PROMPT_SCHEMA function for AI-generated schema summaries. - Sections: Describe contents of a database - [PROMPT_SQL](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/prompt-sql): Generate SQL queries from natural language descriptions using the PROMPT_SQL function. - Sections: Overview, Syntax, Parameters, Examples, Failure example, Best practices... - [SQL Assistant](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant) - Sections: Available functions, Notes - [ALTER DATABASE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/alter-database): Update storage-related settings on a MotherDuck database. - Sections: Syntax, Options, Notes, Plan limits, Examples - [ALTER DATABASE SET SNAPSHOT](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/alter-database-snapshot): Restore a database from a snapshot using ALTER DATABASE SET SNAPSHOT TO. - Sections: Overview, Syntax, Options, Notes, Examples - [ALTER SNAPSHOT](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/alter-snapshot): Rename or remove names from database snapshots using ALTER SNAPSHOT. - Sections: Syntax, Considerations, Example usage - [ATTACH](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/attach): Attach local databases, MotherDuck databases, or public shares to your session - Sections: Attaching databases, Attaching shares, Troubleshooting - [COPY FROM DATABASE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/copy-database): Copy a database from one location to another in MotherDuck - Sections: Syntax, Example Usage - [COPY FROM DATABASE (OVERWRITE)](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/copy-database-overwrite): Overwrite a database with a zero-copy clone from another database. - Sections: Syntax - [CREATE DATABASE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/create-database): Create a database, zero-copy clone from an existing database, or import a local DuckDB file into MotherDuck. - Sections: Syntax, Database Options, Source Database Options, Example Usage - [CREATE SECRET](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/create-secret): Create a secret in MotherDuck - Sections: Syntax, Secret parameters, Examples, Querying with secrets, Discovering buckets and files, Troubleshooting - [CREATE SHARE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/create-share): Create a share from a database to share data with other users - Sections: Syntax, Example Usage - [CREATE SNAPSHOT](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/create-snapshot): Create a snapshot of a MotherDuck database for recovery or read scaling. - Sections: Syntax, Notes, Read scaling, Examples - [DATABASE_SNAPSHOTS view](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/database_snapshots): Query the DATABASE_SNAPSHOTS view for snapshot history and data recovery options. - Sections: Schema, Example usage, Understanding timestamps, Troubleshooting, See also - [DATABASES view](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/databases): Query the DATABASES view to list all databases you have created in MotherDuck. - Sections: Schema, Example usage - [DESCRIBE SHARE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/describe-share): Get details about a specific share by name or URL. - [DETACH](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/detach): Detach local, remote, or shared databases from your session - Sections: Detaching Databases, Detaching Shares - [DROP DATABASE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/drop-database): Remove a database from MotherDuck. - [DROP SECRET](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/delete-secret): Delete a secret from MotherDuck or local storage. - [DROP SHARE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/drop-share): Delete a share and revoke access for all attached users. - [EMBEDDING](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/embedding): Generate vector embeddings for text using the EMBEDDING function for semantic search. - Sections: Embedding Function - [EXPLAIN](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/explain): Display the physical query plan without executing the query. - Sections: Syntax, Example Usage - [EXPLAIN ANALYZE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/explain-analyze): Execute a query and display performance metrics for each operator. - Sections: Syntax, Example Usage - [GRANT READ ON SHARE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/grant-access): Give users access to a restricted share. - Sections: Syntax, Example usage, Complete workflow example - [LIST SECRETS](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/list-secrets): List all secrets stored in memory and MotherDuck. - [LIST SHARES](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/list-shares): List all shares created by the current user. - Sections: Syntax, Output - [list_databases](https://motherduck.com/docs/sql-reference/mcp/list-databases): List all databases in your MotherDuck account - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example - [MD_LIST_DIVES](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/md-list-dives): List all Dives in your MotherDuck account with pagination support. - Sections: Syntax, Parameters, Return Columns, Examples, Related - [MD_RUN parameter](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md-run-parameter): Control whether table functions run locally or remotely. - [Monitoring active server connections](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/connection-management/monitor-connections): View active connections and running queries in MotherDuck using md_active_connections. - Sections: Syntax - [PRINT_MD_TOKEN pragma](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/print-md-token): Retrieve your MotherDuck authentication token. - [PROMPT](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/prompt): Generate text using AI models directly in SQL with the PROMPT function. - Sections: Prompt Function, Syntax, Example Usage, Use Cases, Batch Processing, Error Handling... - [QUERY_HISTORY view](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/query_history): Access detailed query history and metrics using the QUERY_HISTORY view (Business plan). - Sections: Schema, Example usage - [RECENT_QUERIES view](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/recent_queries): View recent query activity across your organization using the RECENT_QUERIES view (Business plan). - Sections: Schema, Example usage, Limitations - [REFRESH DATABASE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/refresh-database): Sync databases with the latest snapshot or share updates. - Sections: Behavior by connection mode, Syntax, Examples, Related Content - [REVOKE READ ON SHARE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/revoke-access): Remove user access from a restricted share. - Sections: Syntax, Example usage - [SHOW ALL DATABASES](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/show-databases): List all MotherDuck, DuckDB, and shared databases. - [Shutting Down a Duckling](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/shutdown-terminate): Gracefully shut down or force-terminate your Duckling to manage compute costs and recover from stuck queries. - Sections: SHUTDOWN, SHUTDOWN TERMINATE, Choosing between SHUTDOWN and SHUTDOWN TERMINATE - [STORAGE_INFO views](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/storage_info): View storage footprint, billing, and lifecycle information for all databases in your MotherDuck organization - Sections: Overview, Syntax, Columns, Examples, Notes, Troubleshooting - [TEMPORARY TABLES](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/temporary-tables): Create local temporary tables for session-scoped data. - Sections: Syntax, Example Usage, Notes - [UNDROP DATABASE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/undrop-database): Restore a dropped MotherDuck database within its snapshot retention window. - Sections: Syntax, Notes, Examples - [UPDATE SHARE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/update-share): Manually update a share with a new database snapshot. - [useSQLQuery hook](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/use-sql-query): React hook for querying MotherDuck data from within Dives. - Sections: Import, Syntax, Parameters, Return value, Numeric values, Examples... - [Interrupting active server connections](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/connection-management/interrupt-connections): Cancel running queries and terminate active connections to MotherDuck using SQL commands. - Sections: Syntax, Return value, Example usage - [list_shares](https://motherduck.com/docs/sql-reference/mcp/list-shares): List database shares that have been shared with you - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Empty Response Example... - [MD_GET_DIVE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/md-get-dive): Retrieve a Dive by ID including its full React component content. - Sections: Syntax, Parameters, Return Columns, Examples, Errors, Related - [OWNED_SHARES view](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/owned_shares): Query the OWNED_SHARES view to see database shares you have created. - Sections: Schema, Example usage - [Query syntax](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/query-syntax): DuckDB query syntax including SELECT, FROM, WHERE, GROUP BY, ORDER BY, and other clauses. - [Data types](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/data-types): Supported data types in DuckDB including numeric, string, date/time, and complex types. - Sections: VARIANT type - [Enum data type](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/enum): DuckDB enum data type for defining columns with a fixed set of string values. - [Expressions](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/expressions): DuckDB expression syntax including operators, CASE, subqueries, and type casts. - [Identify client connection and DuckDB ID](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/connection-management/connection-duckdb-id): Retrieve connection identifiers and DuckDB instance IDs for debugging and monitoring. - Sections: Syntax, Example usage - [list_tables](https://motherduck.com/docs/sql-reference/mcp/list-tables): List tables and views in a MotherDuck database - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Error Response Example - [MD_CREATE_DIVE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/md-create-dive): Create a new Dive in your MotherDuck account. - Sections: Syntax, Parameters, Return Columns, Examples, Related - [Postgres Endpoint](https://motherduck.com/docs/sql-reference/postgres-endpoint): Connection parameters, SSL options, session settings, and limitations for the MotherDuck Postgres wire protocol endpoint - Sections: Connection parameters, Connection string formats, SSL and certificate verification, Session options, Supported features and limitations - [SHARED_WITH_ME view](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/shared_with_me): Query the SHARED_WITH_ME view to see database shares available to you. - Sections: Schema, Example usage - [list_columns](https://motherduck.com/docs/sql-reference/mcp/list-columns): List columns of a table or view with types and comments - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Error Response Example - [MD_UPDATE_DIVE_METADATA](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/md-update-dive-metadata): Update a Dive's title or description without creating a new version. - Sections: Syntax, Parameters, Return Columns, Examples, Errors, Related - [Retrieve the last query ID](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/connection-management/last-query-id): Use MD_LAST_QUERY_ID() to get the UUID of the most recent query sent to MotherDuck. - Sections: Syntax, Return type, Example usage - [Functions](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/functions): Built-in scalar functions in DuckDB for string manipulation, math, dates, and more. - [MD_UPDATE_DIVE_CONTENT](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/md-update-dive-content): Update a Dive's React component code, creating a new version. - Sections: Syntax, Parameters, Return Columns, Examples, Errors, Related - [PRAGMA database_size](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/database_size): Get storage size information for MotherDuck databases using PRAGMA database_size. - Sections: Alternative invocations, Schema, Example Usage - [search_catalog](https://motherduck.com/docs/sql-reference/mcp/search-catalog): Fuzzy search across databases, schemas, tables, columns, and shares - Sections: Description, Input Parameters, Output Schema, Result Limits, Example Usage, Success Response Example... - [Aggregate functions](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/aggregate-functions): DuckDB aggregate functions like SUM, COUNT, AVG, and statistical functions. - [MD_DELETE_DIVE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/md-delete-dive): Permanently delete a Dive by ID. - Sections: Syntax, Parameters, Return Columns, Examples, Errors, Related - [query](https://motherduck.com/docs/sql-reference/mcp/query): Execute SQL queries against MotherDuck databases - Sections: Description, Input Parameters, Output Schema, Limits, Example Usage, Success Response Example... - [query_rw](https://motherduck.com/docs/sql-reference/mcp/query-rw): Execute SQL queries that can modify data or schema in MotherDuck - Sections: Description, Input parameters, Output schema, Limits, Example usage - [ask_docs_question](https://motherduck.com/docs/sql-reference/mcp/ask-docs-question): Ask questions about DuckDB or MotherDuck documentation - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Tips for Good Questions - [MD_LIST_DIVE_VERSIONS](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/md-list-dive-versions): List all versions of a specific Dive with pagination support. - Sections: Syntax, Parameters, Return Columns, Examples, Errors, Related - [Window functions](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/window-functions): DuckDB window functions for ranking, running totals, and analytical queries. - [Configurations](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/configurations): DuckDB configuration options for memory, threads, and query behavior. - [get_dive_guide](https://motherduck.com/docs/sql-reference/mcp/get-dive-guide): Load instructions for creating MotherDuck Dives - Sections: Description, Input parameters, Output schema, Example usage - [MD_GET_DIVE_VERSION](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/md-get-dive-version): Retrieve a specific historical version of a Dive including its content. - Sections: Syntax, Parameters, Return Columns, Examples, Errors, Related - [Constraints](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/constraints): Table constraints in DuckDB including PRIMARY KEY, UNIQUE, NOT NULL, and CHECK. - [list_dives](https://motherduck.com/docs/sql-reference/mcp/list-dives): List all Dives in your MotherDuck workspace - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example - [Information schema](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/information-schema): DuckDB information_schema views for querying database metadata. - [read_dive](https://motherduck.com/docs/sql-reference/mcp/read-dive): Read a specific Dive by ID, including its full component code - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Error Response Example - [Metadata functions](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/metadata-functions): DuckDB functions for querying table and column metadata programmatically. - [save_dive](https://motherduck.com/docs/sql-reference/mcp/save-dive): Save a new Dive to your MotherDuck workspace - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Validation Error Response Example - [PRAGMA statements](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/pragma-statements): PRAGMA statements for DuckDB configuration and metadata queries. - [update_dive](https://motherduck.com/docs/sql-reference/mcp/update-dive): Update an existing Dive's title, description, or content - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Error Response Example - [SAMPLE](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/sample): SAMPLE clause for retrieving random subsets of query results in DuckDB. - [share_dive_data](https://motherduck.com/docs/sql-reference/mcp/share-dive-data): Share the data for a Dive with your organization - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Nothing to Share Response Example... - [delete_dive](https://motherduck.com/docs/sql-reference/mcp/delete-dive): Permanently delete a Dive by ID - Sections: Description, Input Parameters, Output Schema, Example Usage, Success Response Example, Error Response Example - [ALTER TABLE](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/alter-table): ALTER TABLE statement for modifying table structure in DuckDB. - [ATTACH/DETACH](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/attach-detach): ATTACH and DETACH statements for connecting to external databases in DuckDB. - [CALL](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/call): CALL statement for executing table functions in DuckDB. - [COMMENT ON](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/comment-on): COMMENT ON statement for adding descriptions to database objects in DuckDB. - [COPY](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/copy): COPY statement for importing and exporting data in DuckDB. - [Create an access token for a user](https://motherduck.com/docs/sql-reference/rest-api/users-create-token): Create an access token for a user, including service accounts. - [CREATE INDEX](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/create-index): Use CREATE INDEX to speed up point lookups and highly selective queries in MotherDuck. - Sections: Syntax, When to use indexes, Example, Constraints, Trade-offs - [CREATE MACRO](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/create-macro): CREATE MACRO statement for defining reusable SQL expressions in DuckDB. - [Create new user (service account)](https://motherduck.com/docs/sql-reference/rest-api/users-create-service-account): Create a new user, typically a service account, within your MotherDuck organization. - [CREATE TABLE](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/create-table): CREATE TABLE statement for defining new tables in DuckDB. - [DELETE](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/delete): DELETE statement for removing rows from DuckDB tables. - [Delete a user](https://motherduck.com/docs/sql-reference/rest-api/users-delete): Permanently delete a user and all of their data. THIS CANNOT BE UNDONE - [DROP](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/drop): DROP statement for removing tables, views, and other objects in DuckDB. - [DuckDB SQL](https://motherduck.com/docs/sql-reference/duckdb-sql-reference): DuckDB SQL Reference - [DuckDB statements](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements): DuckDB SQL statements reference - [EXPORT](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/export): EXPORT statement for exporting database contents to files in DuckDB. - [Get user Ducklings](https://motherduck.com/docs/sql-reference/rest-api/ducklings-get-duckling-config-for-user): Gets Duckling (instance) configuration for a user. Requires 'Admin' role. - [INSERT](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/insert): INSERT statement for adding rows to tables in DuckDB. - [Introduction to MD_INFORMATION_SCHEMA](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md_information_schema/introduction): Introduction to MD_INFORMATION_SCHEMA - Sections: Example usage - [Invalidate a user access token](https://motherduck.com/docs/sql-reference/rest-api/users-delete-token): Invalidate a user access token - [List a user's access tokens](https://motherduck.com/docs/sql-reference/rest-api/users-list-tokens): List a user's access tokens - [MD_ATTACHED_DATABASES](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md-attached-databases): List databases attached to your DuckDB and MotherDuck session. - Sections: Syntax, Output, Example usage - [MD_LIST_BUCKETS_FOR_SECRET](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md-list-buckets-for-secret): List S3 buckets visible to a named MotherDuck secret. - Sections: Syntax, Output, Example usage - [MD_LIST_FILES](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md-list-files): List files and folders in S3 and Azure storage from SQL. - Sections: Syntax, Output, Example usage, Notes - [MD_LIVE_DUCKLING_SIZE](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md-live-duckling-size): Return the current Duckling instance type for the active MotherDuck connection. - Sections: Syntax, Output, Example usage - [MD_USER](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md-user): Return the current MotherDuck user name. - Sections: Syntax, Output, Example usage - [MD_VERSION](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/md-version): Inspect the loaded MotherDuck extension version and build hash. - Sections: Syntax, Output, Example usage - [MotherDuck SQL](https://motherduck.com/docs/sql-reference/motherduck-sql-reference): MotherDuck-specific SQL extensions and cloud database management - [PIVOT](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/pivot): PIVOT statement for transforming rows to columns in DuckDB. - [RESULT](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/result): Run a SELECT asynchronously and query its cached results like a table. - Sections: Syntax, Output, Example usage, Notes - [SELECT](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/select): SELECT statement syntax and options in DuckDB. - [Set user Ducklings](https://motherduck.com/docs/sql-reference/rest-api/ducklings-set-duckling-config-for-user): Configure account-specific settings, such as Duckling sizes for service accounts. See the Service Accounts Guide for context. - [SET/RESET](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/set-reset): SET and RESET statements for configuring DuckDB session options. - [SQL reference](https://motherduck.com/docs/sql-reference): SQL reference for MotherDuck & DuckDB - [UNPIVOT](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/unpivot): UNPIVOT statement for transforming columns to rows in DuckDB. - [UPDATE](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/update): UPDATE statement for modifying existing rows in DuckDB tables. - [USE](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/use): USE statement for changing the default database or schema in DuckDB. - [VACUUM](https://motherduck.com/docs/sql-reference/duckdb-sql-reference/duckdb-statements/vacuum): VACUUM statement for optimizing storage in DuckDB. - [Wasm Client](https://motherduck.com/docs/sql-reference/wasm-client): Connect browser applications to MotherDuck using the DuckDB WebAssembly client and Hybrid Query Execution. - Sections: Examples, Status, DuckDB Version Support, Installation, Requirements, Dependencies... ## Troubleshooting - [Error Messages](https://motherduck.com/docs/troubleshooting/error_messages): Common MotherDuck error messages and their solutions, including connection and configuration errors. - Sections: Connection errors - [FAQ](https://motherduck.com/docs/troubleshooting/faq): Frequently asked questions about MotherDuck including DuckDB versions, connection methods, and common issues. - [Uninstall MotherDuck extension](https://motherduck.com/docs/troubleshooting/uninstall): Steps to completely remove the MotherDuck extension and related environment variables from your system. - [Reinstall MotherDuck extension](https://motherduck.com/docs/troubleshooting/reinstall-md-extension): Force reinstall the MotherDuck extension when experiencing connection or compatibility issues. - [Install certificate on Windows machines](https://motherduck.com/docs/troubleshooting/windows-certs): Fix Let's Encrypt certificate trust issues on Windows that cause HTTP 400/500 connection errors. - [AWS S3 secrets troubleshooting](https://motherduck.com/docs/troubleshooting/aws-s3-secrets): Diagnose and fix AWS S3 credential issues including IAM policies, credential chains, and secret configuration. - Sections: Prerequisites, Verify secret access, Configure permissions in AWS, AWS credential chain, Common challenges, What's Next - [Troubleshooting Data Access Policy](https://motherduck.com/docs/troubleshooting/troubleshooting-access-policy): Policy details for when MotherDuck support accesses your account data during troubleshooting. - [Support](https://motherduck.com/docs/troubleshooting/support): Contact MotherDuck support via Slack community or email for questions not covered in the FAQ. - [MotherDuck Version Lifecycle Schedules](https://motherduck.com/docs/troubleshooting/version-lifecycle-schedules): DuckDB and DuckLake version support schedules, end of life policies, and extended lifecycle support options. - Sections: Supported versions, MotherDuck support lifecycle schedules, End of life (EOL) policy, MotherDuck extended lifecycle support add-on - [Glossary](https://motherduck.com/docs/troubleshooting/glossary): Definitions of key terms and concepts used throughout the MotherDuck documentation. - [Troubleshooting](https://motherduck.com/docs/troubleshooting): Troubleshooting ## About MotherDuck - [Release notes](https://motherduck.com/docs/about-motherduck/release-notes): Latest updates, new features, and improvements to MotherDuck. - Sections: April 9, 2026, April 3, 2026, March 25, 2026, March 24, 2026, March 12, 2026, March 6, 2026... - [Understanding the pricing model](https://motherduck.com/docs/about-motherduck/billing/pricing): Details of MotherDuck's pricing model. - Sections: MotherDuck pricing model, Incentive programs: - [Managing your bill](https://motherduck.com/docs/about-motherduck/billing/managing-billing): Learn how to manage your MotherDuck spend, choose plans, monitor usage, and view invoices. - Sections: Choosing Your Billing Plan, Monitoring Usage, Viewing Your Invoice - [Tag workloads with custom user agents](https://motherduck.com/docs/about-motherduck/billing/tag-workloads-with-custom-user-agents): Add workload tags with custom_user_agent and use QUERY_HISTORY to group activity by workload, tenant, or pipeline. - Sections: 1. choose a tagging convention, 2. understand what QUERY_HISTORY stores, 3. set custom_user_agent, 4. inspect recent tagged queries, 5. group tagged activity by workload, 6. use tagged activity for internal allocation - [Duckling Sizes](https://motherduck.com/docs/about-motherduck/billing/duckling-sizes): Learn about MotherDuck Duckling (compute instance) sizes and their optimal use cases. - Sections: Duckling sizes, Configuring the cooldown period, Changing Duckling sizes - [Feature stages](https://motherduck.com/docs/about-motherduck/feature-stages): Understanding MotherDuck's feature lifecycle stages — Preview and Generally Available. - Sections: Preview, Generally Available (GA) - [Legal](https://motherduck.com/docs/about-motherduck/legal): Terms of service, privacy policy, and other legal documents for MotherDuck. - Sections: Product Terms of Service - [About MotherDuck](https://motherduck.com/docs/about-motherduck): About MotherDuck - [MotherDuck Billing](https://motherduck.com/docs/about-motherduck/billing): Learn more about MotherDuck's pricing model and how to manage billing.