> For the complete documentation index, see [llms.txt](https://george-jen.gitbook.io/data-science-and-apache-spark/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://george-jen.gitbook.io/data-science-and-apache-spark/issues-with-connecting-from-tableau-to-spark-sql.md).

# Issues with connecting from Tableau to Spark SQL

#### Permission error with root scratch dir

![](/files/-M9FVttXjEyw1w1Z_zjT)

By default hive config attribute hive.exec.local.scratchdir is set to /tmp/hive, NOT HDFS, despite error message says so

```
<property>
   <name>hive.exec.local.scratchdir</name>
   <value>/tmp/hive</value>
   <description>Local scratch space for Hive jobs</description>
</property>

```

Simply change to:

```
<property>
   <name>hive.exec.local.scratchdir</name>
   <value>~/tmp/hive</value>
   <description>Local scratch space for Hive jobs</description>
</property>

```

Then in the OS, log in as user that owns HIVE

```
cd ~
mkdir tmp
cd tmp
mkdir hive
cd ~
chmod -R 777 tmp/hive
```

Relaunch Tableau to connect to Spark SQL

#### Problem with ODBC driver, then uninstall and reinstall

Simply uninstall ODBC driver.

On Windows, uninstall ODBC driver in the red box from control panel -> program and feature

![](/files/-M9FZMtkBHXtwDK2Z7AL)

On Mac, delete or move away ODBC driver file and edit odbcinstall.ini

```
sudo cp /Library/ODBC/odbcinst.ini /Library/ODBC/odbcinst.ini.org
sudo vi /Library/ODBC/odbcinst.ini
```

```
[ODBC Drivers]
PostgreSQL Unicode      = Installed
Simba Spark ODBC Driver = Installed

[PostgreSQL Unicode]
Description = PostgreSQL ODBC driver
Driver      = /usr/local/lib/psqlodbcw.so

[Simba Spark ODBC Driver]
Driver = /Library/simba/spark/lib/libsparkodbc_sbu.dylib

```

delete line 3, line 9 and line 10, it should be like below

```
[ODBC Drivers]
PostgreSQL Unicode      = Installed

[PostgreSQL Unicode]
Description = PostgreSQL ODBC driver
Driver      = /usr/local/lib/psqlodbcw.so

```

save and exit vi

Next, move away /Library/simba folder

```
mv /Libray/simba /Library/simba.org
```

Then you will get back to initial state of your Tableau Spark SQL log in screen that requires you to download ODBC driver following link on the screen.

![](/files/-M9Fbabw5oXrrEN22tDd)

or

![](/files/-M9Fbl9dTwispyMseh4c)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://george-jen.gitbook.io/data-science-and-apache-spark/issues-with-connecting-from-tableau-to-spark-sql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
