Skip to content

Drop 'driver="abc"' from JDBC options when connecting to a database #752

@yruslan

Description

@yruslan

Describe the bug

Pramen adds all JDBC properties as Properties object when connecting to JDBC datbases.

But 'driver' property is not needed since the driver is determined by the URL prefix.

Some JDBC drivers throw exceptions when 'driver' property is present, e.g. Trino.

Code and/or configuration snippet that caused the issue

    val properties = new Properties()
    properties.put("driver", jdbcConfig.driver)   <----- REMOVE
    jdbcConfig.user.foreach(db => properties.put("user", db))
    jdbcConfig.password.foreach(db => properties.put("password", db))
    jdbcConfig.database.foreach(db => properties.put("database", db))

Expected behavior

The 'driver' property should not be included with other properties when connecting to a JDBC endpoint.

Context

  • Pramen/pramen-py version: 1.13.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions