Skip to main content
DuckDB Logo

Overview

Use DuckDB as a destination in Mage to write structured data to local DuckDB database files. DuckDB is an embedded analytical database that runs in-process, making it ideal for fast local analytics, data staging, or lightweight data processing workflows. This destination is perfect for scenarios where you need to quickly analyze data locally before pushing to a larger data warehouse, or for building lightweight analytics pipelines.

Required Configuration

You must enter the following configuration when writing to a DuckDB destination:

Configuration Options

if_exists Values


Notes

  • Embedded Database: DuckDB is an embedded database. The file is local to the machine or container where Mage is running.
  • Pandas Integration: Supports writing pandas DataFrames directly to tables in a .duckdb file.
  • File Path: Use absolute paths to ensure the file is created in the correct location.
  • Performance: DuckDB is optimized for analytical queries and can handle large datasets efficiently.
  • Use Cases: Ideal for fast, local analytics or staging data before pushing to a warehouse.

Sample Configuration