Skip to content

Add support for DuckDB #849

@m-feeser

Description

@m-feeser

The elementary package for dbt does not currently support DuckDB. I am working on adding this support and wanted to create this issue to start the discussion as recommended in the CONTRIBUTIONS.md.

My initial plan is to address the errors that I'm seeing when running the current version of the package in an existing DuckDB project.

  • Handle special characters
  • Transaction handling
    • Create a duckdb__get_delete_and_insert_queries() macro in the delete_and_insert.sql file.
    • DuckDB does not like nested transactions, so this macro will not have the begin transaction block
  • timeadd SQL dialect differences
    • Create a duckdb__edf_timeadd() macro in the timeadd.sql file. Use postgres style interval syntax

Are there any other areas I'm overlooking that need to be addressed?

I did notice there is a stale wip branch for DuckDB (duckdb_poc) which addresses materialization differences due to duckdb not supporting CTEs in views when it was created, but this is now supported by DuckDB.

I have never built integration tests for a dbt package, so I will likely need some guidance here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions