BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
AhmedAl_Attar
Ammonite | Level 13

I'm wondering if anyone has experienced this in their SAS/ACCESS Interface to JDBC?

 

Trying to submit the following JDBC engine Libname statement

libname x JDBC driverclass="org.duckdb.DuckDBDriver" URL="jdbc:duckdb::memory:" classpath="/tmp/duckdb_jdbc-0.10.0.jar";

and getting this Error

ERROR: Error retrieving DatabaseMetaData: java.sql.SQLFeatureNotSupportedException: getTypeInfo
ERROR: Error in the LIBNAME statement.

Note: According to their Web site, "DuckDB’s JDBC API implements the main parts of the standard Java Database Connectivity (JDBC) API, version 4.1"

1 ACCEPTED SOLUTION

Accepted Solutions
JuanS_OCS
Azurite | Level 17

FYI, I see it is resolved with the latest version 1.3.1.0

 

83         libname x JDBC driverclass="org.duckdb.DuckDBDriver" URL="jdbc:duckdb::memory:"
83       ! classpath="/data-drivers/jdbc/duckdb_jdbc-1.3.1.0.jar";
NOTE: Libref X was successfully assigned as follows: 
      Engine:        JDBC 
      Physical Name: jdbc:duckdb::memory:
84         *libname x JDBC driverclass="org.duckdb.DuckDBDriver" URL="jdbc:duckdb::memory:"
84       ! classpath="/data/duckdb_jdbc-1.3.1.0.jar";

View solution in original post

7 REPLIES 7
SASKiwi
PROC Star

I can find no reference to DuckDB and JDBC on the SAS Support site, nor the error encountered. I'd suggest tracking to Tech Support and posting the response here.

AhmedAl_Attar
Ammonite | Level 13

Hi @SASKiwi 

That's exactly what I did. I have an active SAS Tech Support Track and, I opened an issue in the DuckDB's GitHub repo.

I posted to the forum to see if anyone has experienced similar issue with other ODBC/JDBC drivers and while using the SAS/ACCESS Interface to ODBC/JDBC

 

Thanks

JuanS_OCS
Azurite | Level 17

FYI, I see it is resolved with the latest version 1.3.1.0

 

83         libname x JDBC driverclass="org.duckdb.DuckDBDriver" URL="jdbc:duckdb::memory:"
83       ! classpath="/data-drivers/jdbc/duckdb_jdbc-1.3.1.0.jar";
NOTE: Libref X was successfully assigned as follows: 
      Engine:        JDBC 
      Physical Name: jdbc:duckdb::memory:
84         *libname x JDBC driverclass="org.duckdb.DuckDBDriver" URL="jdbc:duckdb::memory:"
84       ! classpath="/data/duckdb_jdbc-1.3.1.0.jar";
AhmedAl_Attar
Ammonite | Level 13

@JuanS_OCS 

Just as a bonus, I managed to successfully connect SAS 9.4 M8 to DuckDB via SAS/ACCESS Interface to ODBC on Linux (RHEL 8.1) using DuckDB's 1.3.0.0 ODBC driver for Linux  😉

JuanS_OCS
Azurite | Level 17
Excellent, thanks! I am planning on testing all the options and figure out the differences, especially in basic performance 😉 I am curious about your progress too!
AhmedAl_Attar
Ammonite | Level 13

I'll report back once I have some working code samples.

Note: I have had success with using the DuckDB CLI from SAS 9.4 via the xcmd interface and executed *.sql script that was dynamically modified by SAS. but Data Transfer between the two software was a bit cloggy, as I had to export to CSV from DuckDB and Import it in SAS to generate SAS data set(s). 

 

But now, using JDBC/ODBC would allow for better integration specially specially with using Explicit DuckDB SQL Statements 😉

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 2856 views
  • 5 likes
  • 3 in conversation