Skip to content

H2 database without dialect is unsupported #1595

@koperagen

Description

@koperagen

Repro in notebooks:

%use database
#%%
val src = createDataSource("jdbc:h2:mem:testdb")
#%%
%use dataframe(1.0.0-dev-8941), kandy(0.8.3-dev-92, 0.5.1-dev-2)

#%%
DataFrame.readSqlQuery(src, """SELECT 1""")

Error:
java.lang.IllegalArgumentException: Unsupported database type in the url: jdbc:h2:mem:testdb. Only MySQL, MariaDB, MSSQL and PostgreSQL are supported!
at org.jetbrains.kotlinx.dataframe.io.db.UtilKt.extractDBTypeFromConnection(util.kt:54)

Similar connection string are used in our guides/kdocs:
https://kotlin.github.io/dataframe/h2.html#read
https://github.com/Kotlin/kotlin-notebook-integrations/blob/master/integrations/database/database-api/src/main/kotlin/org/jetbrains/kotlinx/jupyter/database/apis.kt#L47

Worth to improve error message, or maybe provide default dialect or implement new DbType

Metadata

Metadata

Assignees

Labels

databasesJDBC related issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions