problem with rjdbc and dbconnect while using file.sql

Hello community,
I am facing a problem and I need some help.

I have a file.sql which is a SQL script with some parameters :

SELECT 
    but_name
FROM transaction tr
AND trunc(the_date_transaction) BETWEEN ? AND ?
GROUP BY but_name
ORDER BY t DESC

I then connect using rjdbc and DBI connect without any problem :

driver <- RJDBC::JDBC(driverClass = "java.sql.Driver", classPath = "/home/jars/DatabricksJDBC42.jar", identifier.quote = "'")
connection_string <- paste0("jdbc:databricks://hhhhhhhh:443/default;transportMode=http;ssl=1;AuthMech=3;httpPath=/sql/1.0/endpoints/XXXXX;user=token;password=", PERSONAL_TOKEN, ";")
conn <- DBI::dbConnect(driver, connection_string)

When I run this :
df <- dbGetQuery(conn, statement = readr::read_file('/home//src/data/SQL/getShipCurrentMonth.sql'), params = list(beginning_month_current_year, d_1))

I am getting this error :

[2023-11-16, 09:03:09 CET] {{pod_manager.py:381}} INFO - Error in dbSendQuery(conn, statement, ...) :
[2023-11-16, 09:03:09 CET] {{pod_manager.py:381}} INFO -   Unable to retrieve JDBC result set
[2023-11-16, 09:03:09 CET] {{pod_manager.py:381}} INFO -   JDBC ERROR: [Databricks][JDBC](10900) Not all parameters have been populated.

How can I resolved this please. ?

This topic was automatically closed 42 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.