> 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)
