在你所分享的联系中,数据盘刚刚释放了一个新的ARM64-compatabile ODBC司机。 一个主要问题是缺乏ARM的汇编,与RStudio和R资料袋一起寻找这套材料。 我采取的粗略步骤是:
- Install ODBC manager:
brew install unixodbc
- Check to ensure installation and paths for
.ini
files with odbcinst -j
- Install the latest version of the Databricks ODBC driver. By default, it will be installed at the path
/Library/simba/spark
- Copy and paste the following command in your CLI:
echo "
" >> /opt/homebrew/etc/odbcinst.ini
echo "[databricks_spark_sql]" >> /opt/homebrew/etc/odbcinst.ini
echo "Driver=/Library/simba/spark/lib/libsparkodbc_sb64-universal.dylib" >> /opt/homebrew/etc/odbcinst.ini
echo "ODBCInstLib=/opt/homebrew/opt/unixodbc/lib/libodbcinst.2.dylib" >> /Library/simba/spark/lib/simba.sparkodbc.ini
这些指挥部在<代码>unixODBC司机主管使用的“联接组合文档”上添加了<代码>数据碎片。 该系统还提供<条码>unixODBC公共事业,可在<条码>上查询。 一旦完成,关闭了您的终点站并开放了RStudio。
- Add an entry to your
.Rprofile
that sets an environment variable that tells R where to look for odbc s configuration files. This is where the odbcinst.ini
file is stored. From within a project in RStudio, you can do this by opening your .Rprofile with the following command:
usethis::edit_r_profile(scope = project )
然后,在......。 引人注意:
Sys.setenv(ODBCSYSINI= /opt/homebrew/etc )
Restart your R Session and check that the new ODBC driver is recognized/being listed correctly:
odbc::odbcListDrivers()
通过利用文件将数据盘连接到ODBC。 从<条码>dbplyr,它可研究类似情况:
db_odbc <- DBI::dbConnect(
drv = odbc::odbc(),
driver = databricks_spark_sql ,
server = adb-[...].azuredatabricks.net ,
host = adb-[...].azuredatabricks.net ,
port = 443,
httppath = /sql/1.0/warehouses/01d71fe07e891bb6 ,
catalog = ... ,
schema = ... ,
thrifttransport = 2,
ssl = 1,
authmech = 3,
uid = token ,
pwd = keyring::key_get(service = simba_connector_token )
)