DQD not recognising jar files to connect to sql server?

We are trying to implement the DQD on our side to run some sanity checks, but having trouble getting it off the ground.

library(DataQualityDashboard)

#Setup 
connection_details <- DatabaseConnector::createConnectionDetails(
  dbms = "sql server",
  server = "server_address",
  pathToDriver = "D:\\Program Files\\Microsoft JDBC DRIVER 12.10 for SQL Server\\sqljdbc_12.10\\enu\\jars",
  )

## Imagine there's a lot of other config variables here

DataQualityDashboard::executeDqChecks(connectionDetails = connection_details,
                                      cdmDatabaseSchema = cdmDatabaseSchema,
                                      resultsDatabaseSchema = resultsDatabaseSchema,
                                      cdmSourceName = cdmSourceName,
                                      cdmVersion = cdmVersion,
                                      outputFolder = outputFolder,
                                      outputFile = outputFile,
                                      verboseMode = verboseMode,
                                      writeToTable = writeToTable,
                                      writeToCsv = writeToCsv,
                                      csvFile = csvFile,
                                      checkLevels = checkLevels,
                                      checkSeverity = checkSeverity
                                      )

When running the DatabaseConnector::createConnectionDetails() it’s fine, no errors, sets the values and we are off to the races, but when it comes down to execute the checks, I am greeted with the following error:

Error in rJava::.jcall(jdbcDriver, "Ljava/sql/Connection;", "connect", : com.microsoft.sqlserver.jdbc.SQLServerException: Invalid URL specified: /D:/Program Files/Microsoft JDBC DRIVER 12.10 for SQL Server/sqljdbc_12.10/enu/jars/mssql-jdbc-12.10.0.jre11.jar.

I know well and good that this is the address where the jar lives, I also set it as a PATH variable and tried that and it also produced the same result. Is there some step I am missing? The documentation isn’t very deep for troubleshooting.

We are able to get a successful connection running java from the command line with the following:

java -cp ".;D:\Program Files\Microsoft JDBC DRIVER 12.10 for SQL Server\sqljdbc_12.10\enu\jars\mssql-jdbc-12.10.0.jre11.jar" SqlServerNamedInstanceAuthTester.java but that obviously doesn’t help too much.

Alternatively, is there a way to just supply a URI string or some other “normal” way of connecting to the DB rather than just passing in parameters?

Hi there, the error seems to be with DatabaseConnector, not DataQualityDashboard specific. To confirm this, you can try to run DatabaseConnector::connect(connectionDetails).

Here are the DatabaseConnector docs which might help with debugging: Connecting to a database • DatabaseConnector

Hey, we found out the problem. Apparently it doesn’t like having spaces in the folder(s) to the jar files, so removing them solved our issues. (Maybe worth a note in the documentation)

Thank you for the reply!