Skip to content

Add Support for DuckDB #2139

@naiyerasif

Description

@naiyerasif

DuckDB is a very popular analytical database which follows SQL dialect similar to Postges with minor exceptions.

Currently, JdbcTemplate works if I stay close to Postgres dialect while using DuckDB but cracks begin to show when I try to use DuckDB-specific syntax. Also, by default, Spring Data refuses to load the DuckDB datasource through configuration file, throwing UnsatisfiedDependencyException even when the DuckDB driver is on classpath, forcing me to fallback to programmatic datasurce initialization.

This request is to add support for the following:

  • When spring.datasource.url=jdbc:duckdb:, Spring Data should assume DuckDB to be running in in-memory mode and use in-memory semantics (such as turning spring.sql.init.mode=always) to initialize a datasource bean.
  • When spring.datasource.url=jdbc:duckdb:/tmp/my_database, Spring Data should assume DuckDB to be running in persistent mode and use the default semantics to initialize a datasource bean.
  • An official dialect support would be fantastic but at the very least JdbcTemplate should not throw exception for DuckDB specific syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions