admin管理员组文章数量:1391947
I am trying to create a connection betweeen R (Shiny) and Databricks using dbpool and ODBC with simba 64 bit as the driver. using dbGetQuery(conn, "select current_catalog()")) i can see that its hitting the correct catalog. When I do dblisttables(conn), i can see the table i want to query
but when i do dbGetQuery(conn, "select * from table_name") it gives me an error saying table not found even though the table exists.
In the error message it has added a "SPARK" keyword in front of the table: Table or view not found: SPARK..table_name From 'nanodbc/nanodbc.cpp:1722'
Im setting the environment using a dockerfile. As im new to doing this could someone point out what Im doing wrong? This is how im downloading the Simba driver and configuring the ODBC details.
# Download the Simba Spark ODBC Driver
RUN wget -O /tmp/SimbaSparkODBC.zip ".6.15/SimbaSparkODBC-2.6.15.1018-LinuxRPM-64bit.zip"
# Unzip and install the driver
RUN unzip /tmp/SimbaSparkODBC.zip -d /tmp/ && \
rpm -ivh /tmp/SimbaSparkODBC-2.6.15.1018-LinuxRPM-64bit/simbaspark-2.6.15.1018-1.x86_64.rpm && \
rm -rf /tmp/SimbaSparkODBC-2.6.15.1018-LinuxRPM-64bit/*
# Configure the ODBC driver in odbcinst.ini
RUN echo "" >> /etc/odbcinst.ini && \
echo "[Simba Spark ODBC Driver 64-bit]" >> /etc/odbcinst.ini && \
echo "Description=Simba Spark ODBC Driver" >> /etc/odbcinst.ini && \
echo "Driver=/opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini && \
echo "Setup=/opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini
Im confused as to why the conn works in terms of hitting the right catalog and schema, but fails to run select queries, even though I can see the table in dblistTables(conn)
Note: I have tried passing the catalog and schema to the select query, without any luck. Also, I'm using service principal credentials ODBC connection string, so im guessing it cannot be not an access issue.
本文标签: Table not found when using ODBC to connect Databricks with R on DockerStack Overflow
版权声明:本文标题:Table not found when using ODBC to connect Databricks with R on Docker - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744706739a2620884.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论