# Issues with connecting from Tableau to Spark SQL

#### Permission error with root scratch dir

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M9FTgLnLT9bijcxKGyx%2F-M9FVttXjEyw1w1Z_zjT%2Ftableau_mac_j3.jpg?alt=media\&token=a55deeb9-fb91-4f80-ac83-bdbf04662dfc)

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

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M9FXrjlJNKMcRfv5QU2%2F-M9FZMtkBHXtwDK2Z7AL%2Ftableau_simba.jpg?alt=media\&token=ad71fa1c-46ef-40f0-9ca3-ca3cf3e8bf74)

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.

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M9FXrjlJNKMcRfv5QU2%2F-M9Fbabw5oXrrEN22tDd%2Ftableau_mac_vm_j1.jpg?alt=media\&token=94b60a73-9d6b-4ba3-819e-4105c40b9d42)

or

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M9FXrjlJNKMcRfv5QU2%2F-M9Fbl9dTwispyMseh4c%2Ftableau_mac_non_vm_j1.jpg?alt=media\&token=8e5bd9de-895a-41f8-b061-056c688332d6)
