DuckDB + Pandas (dagster-duckdb-pandas)

This library provides an integration with the DuckDB database and Pandas data processing library.

class dagster_duckdb_pandas.DuckDBPandasTypeHandler(*args, **kwds)[source]

Stores and loads Pandas DataFrames in DuckDB.

To use this type handler, pass it to build_duckdb_io_manager

Example

from dagster_duckdb import build_duckdb_io_manager
from dagster_duckdb_pandas import DuckDBPandasTypeHandler

@asset
def my_table():
    ...

duckdb_io_manager = build_duckdb_io_manager([DuckDBPandasTypeHandler()])

@repository
def my_repo():
    return with_resources(
        [my_table],
        {"io_manager": duckdb_io_manager.configured({"database": "my_db.duckdb"})}
    )