What would be the preferred way to connect a jdbc-...
# datascience
p
What would be the preferred way to connect a jdbc-trino connection with notebooks and utilize dataframes?
a
I can't find jdbc connections in DataFrame. Our own project
tables-kt
(https://github.com/SciProgCentre/tables-kt) has connections both to DataFrame and to jdbc (via Exposed). So it could in theory be used as a bridge. Sadly, it is not out of prototype stage and not documented. You can try to use it or take the code from appropriate modules. I can ask questions if you do.
Tables-kt is intended as a connector library, that supports both row-based (SQL) and column-based (DataFrame) representation. But we do not have manpower to polish it. Contributions are welcome.
p
Thanks! I tried the exposed way and it doesn't support Trino
a
It is possible to implement a Table for raw JDBC, but it will require some work...
i
@zaleslaw had some experiments with JDBC recently
j
Yes, the DF team is currently exploring database connections using JDBC. It's still in its infancy/experimental stage. You can keep up with this at https://github.com/Kotlin/dataframe/issues/212 or https://github.com/Kotlin/dataframe/issues/408 and feel free to share your usecase there too 🙂
z
Thanks, we have plans to release jdbc connector, for now, you should read tables manually
p
Thanks! Exposed doesn’t work for us as it doesn’t support trino. I shared some hacky code here: https://github.com/Kotlin/dataframe/issues/212#issuecomment-1686342865
👍 1