Connect to the Data Warehouse from Tableau
Answer
To access the Data Warehouse from Tableau:
Windows Setup
- Make sure the Oracle client is installed on your computer.
- Download and install Oracle drivers from the Tableau website
- Make sure that the tnsnames.ora file, usually in C:\oracle\product\11.2.0\client\network\admin, contains an entry for the Data Warehouse's database:
warehouse = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = warehouse.mit.edu)(PORT = 1521)) ) (CONNECT_DATA = (SID = DWRHS)) )
- If your tnsnames file does not have the warehouse, copy and paste the above text into your existing tnsnames.ora file.
- If you do not have a tnsnames.ora file, save this TNSNames.ora file to C:\oracle\product\11.2.0\client\network\admin.
- Make sure the TNS_ADMIN environment variable points to the directory containing the tnsnames.ora file "C:\oracle\product\11.2.0\client\network\admin" and not "C:\oracle\product\11.2.0\client\network\admin\TNSNames.ora".
- Go to Start > Control Panel > System.
- Click Advanced system settings.
- In the Advanced tab, click Environment Variables.
- Scroll through the System variables list for the "TNS_ADMIN" variable.
- If you see the variable, make sure the Value column matches the directory containing tnsnames.ora.
- If you don't see the variable, click New and add the variable and the directory in the Value.
- Click OK and close out of all the System/System properties windows.
- Continue to Connect to the warehouse in Tableau.
Mac Setup
- Make sure you're logged in as an Adminstrator.
- Download the Oracle JDBC driver version 19.18 from here ojdbc8.jar
- Copy the .jar file to this folder (you may have to create it manually):
~/Library/Tableau/Drivers
- Double-click the downloaded .jar file.
- Double-click Tableau Oracle Libraries.pkg.
- Accept all defaults to install the package.
- Save this TNSNames.ora file to your desktop and copy it to /etc:
ARM-based Macs (M1/M2 chips) will also need the following files in /etc - Note: Do not use the command line to copy the file
- In Finder, select Go > Go To Folder, and then type /etc (do not put a period after etc).
- Copy the .ora file to /etc
- Configure the TNS_ADMIN environment variable:
- Start Terminal and type the following command:
sudo nano /etc/launchd.conf
- Type your local password when prompted.
- Type the following:
setenv TNS_ADMIN /etc
- Press Ctrl-X, then Y, then Enter to save changes and exit nano.
- Start Terminal and type the following command:
ARM-based Macs (M1/M2 chips) will also need the following plist file - Start Terminal and type the following command:
nano ~/Library/LaunchAgents/com.oracle.TNS_ADMIN.plist
- Copy and paste the text below
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.oracle.TNS_ADMIN</string> <key>ProgramArguments</key> <array> <string>/bin/launchctl</string> <string>setenv</string> <string>TNS_ADMIN</string> <string>/etc</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
- Press Ctrl-X, then Y, then Enter to save changes and exit nano.
- Start Terminal and type the following command:
- Restart the Mac.
- Confirm you can connect to the Warehouse by opening Terminal and typing the following command:
ping warehouse
- Exit Terminal and continue to Connect to the warehouse in Tableau.
Connect to the warehouse in Tableau (Windows and Mac)
- In Tableau, click Connect to Data.
- Under On a server, click Oracle.
- Enter the following values and leave all other fields blank:
Server warehouse Select User a specific username and password Username your Kerberos username Password your Data Warehouse password
(If you don't have a Data Warehouse password or have forgotten it, see Change Your Data Warehouse Password.) - Click Connect.
- If you get an error, enter ".world" (without the quotes) in the Service field and try again.
- If you're on a Mac, try the following:
- To add tables from the Data Warehouse, see I've successfully connected to the Data Warehouse in Tableau, but I don't see anything. What do I do?
4 Comments
comments.show.hideJul 07, 2015
Susan Riley Hart
There's one place in the instructions where it didn't quite match what I was seeing. The instructions say:
3. Connect to the warehouse in Tableau
On the initial Tableau screen, there was no "Connect to Data" for me to click on. What I needed to do was skip to Step 2.
Apr 26, 2016
Isaac Chuang
The mac drivers are here: http://www.tableau.com/support/drivers?qt-drivers=1#mac-oracle
May 11, 2016
Jon P Daries
Mac Setup:
In addtion to the tnsnames.ora file you need a sqlnet.ora file to do the kerb login, the sqlnet.ora file should have the following text:
Also, instead of setting the environment variable, it's easier to create an environment.plist file saved in ~/Library/LaunchAgents/environment.plist that contains this text:
Restart after installing those files.
Feb 07, 2022
Robert A Arlt
Recent versions of Windows Tableau recommend the Oracle JDBC driver over the Oracle OCI driver. Instructions to install the driver are still on the Tableau driver download page. However, the tnsnames.ora file setup is different.
Windows Setup