could not find function "dbconnect"

Hello everyone,

I need some help regarding a topic. It is the connection of Databricks using R.
To do it, I install rJava, DBI and RJDBC.
I first run : driver <- rjdbc::JDBC(driverClass = "java.sql.Driver", classPath = "/app/jars/DatabricksJDBC42.jar", identifier.quote = "'")

and after I create a connection:
conn <- dbconnect(driver, "jdbc:databricks:domain:port....Password=personalToken)

Then problem is that I can't find why I got the dbconnect problem.

Could you please help me?
Thank you!

Hi @glorena, I recommend you check the name of server and table names.
In my case in use this form to connect with sql developer:

# CONECCION R TO SQL DEVELOPER ----------------------------------------------

path_jar <- "D:\\OneDrive - folder\\Documents\\Conexiones\\ojdbc8.jar"

jdbcDriver <- JDBC("oracle.jdbc.OracleDriver", classPath = path_jar)

jdbcConnection <- dbConnect(jdbcDriver, "jdbc:oracle:thin:@//research:1521/CIATT","YOUR_USER","YOUR_PASSWORD")

### Check the ORACLE
1 Like

dbconnect() is a function in the {DBI} package, did you run this?


or alternatively, if you don't want to load the whole package:

 conn <- DBI::dbconnect(driver, "jdbc:databricks:domain:port....Password=personalToken)
1 Like

Hi @glorena, I'd recommend using ODBC instead of JDBC. Here's the page where we (Posit) walk through where to download the driver, and how to connect using the DBI, and odbc packages: Solutions - Databricks

1 Like

Hi @edgararuiz edgararuiz, I could connect using JDBC. Do you think it may cause problems?

One thing I just noticed is that you're using dbconnect() and not dbConnect(), with the "C" capitalized. That is the proper function name

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.