cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Connection from on-premise R sparklyr session to Databricks, " invalid method toDF for object 17/org.apache.spark.sql.DataFrameReader fields 0 selected 0"

leandro
New Contributor

Hello,

I'm working with an on-premise R session and would like to connect to Databricks using sparklyr. RStudio server in this case is not an option.

I would like to use jdbc. I tested RJDBC + DBI and can conect locally and perform operations. However, my interest is to perform remote operations using sparklyr and then collect the results locally.

I'm using Azure. In my local environment, these are the commands I'm running:

config 

 

The path for the jar file as well as the jdbc string are correct (supressed some text with "xxxx" for privacy).  What I might be doing wrong?  

 

My sessionInfo()

> sessionInfo() 
 
R version 4.2.0 (2022-04-22) 
 
Platform: x86_64-pc-linux-gnu (64-bit) 
 
Running under: CentOS Linux 7 (Core) 
 
 
 
Matrix products: default 
 
BLAS/LAPACK: /share/software/user/open/openblas/0.3.10/lib/libopenblas_haswellp-r0.3.10.so 
 
 
 
locale: 
 
 [1] LC_CTYPE=en_US.UTF-8      LC_NUMERIC=C              
 
 [3] LC_TIME=en_US.UTF-8       LC_COLLATE=en_US.UTF-8    
 
 [5] LC_MONETARY=en_US.UTF-8   LC_MESSAGES=en_US.UTF-8   
 
 [7] LC_PAPER=en_US.UTF-8      LC_NAME=C                 
 
 [9] LC_ADDRESS=C              LC_TELEPHONE=C            
 
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
 
 
 
attached base packages: 
 
[1] stats    graphics grDevices utils    datasets methods  base     
 
 
 
other attached packages: 
 
[1] catalog_0.1.1 sparklyr_1.7.9 
 
 
 
loaded via a namespace (and not attached): 
 
 [1] rstudioapi_0.14  magrittr_2.0.3   tidyselect_1.2.0 R6_2.5.1         
 
 [5] rlang_1.0.6      fastmap_1.1.0    fansi_1.0.3      httr_1.4.4       
 
 [9] dplyr_1.0.10     tools_4.2.0      parallel_4.2.0   config_0.3.1     
 
[13] utf8_1.2.2       cli_3.5.0        DBI_1.1.3        withr_2.5.0      
 
[17] dbplyr_2.2.1     askpass_1.1      htmltools_0.5.4  ellipsis_0.3.2   
 
[21] openssl_2.0.5    yaml_2.3.5       assertthat_0.2.1 rprojroot_2.0.3  
 
[25] digest_0.6.29    tibble_3.1.8     lifecycle_1.0.3  forge_0.2.0      
 
[29] tidyr_1.2.1      purrr_1.0.0      base64enc_0.1-3  htmlwidgets_1.6.1 
 
[33] vctrs_0.5.1      glue_1.6.2       compiler_4.2.0   pillar_1.8.1     
 
[37] r2d3_0.2.6       generics_0.1.3   jsonlite_1.8.4   pkgconfig_2.0.3  
 

 

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group