duckdb / dbt-duckdb

dbt (http://getdbt.com) adapter for DuckDB (http://duckdb.org)
Apache License 2.0
932 stars 89 forks source link

Document Postgres attachment for read/write #476

Closed dumkydewilde closed 1 week ago

dumkydewilde commented 1 week ago

Currently the documentation only shows using Postgres as a plugin. This uses the POSTGRES_SCANNER implementation of DuckDB, however using the Postgres extension as an attachment allows for both reading and writing. Though the current implementation of attachments in DuckDB seems to be intended for file-based attachments, this functionality works for postgres to using a Postgres DSN.

Potentially additional implementation changes can be made to either improve the attachment functionality or even remove the Postgres plugin in favour of the attachment implementation, but I'll leave that up to a discussion. For now I think a simple documentation change can save people a lot of headaches.