Bad Connection: Tableau could not connect to the (AWS Athena) data source

Fixing Tableau to AWS Athena Connection Errors

Ever get this error “Bad Connection: Tableau could not connect to the data source” when connecting to Amazon Athena?

No details available? Really? No need to copy this error message.

JAVA, JAVA, JAVA

If you have this issue you are not alone and no, you are not crazy. There is a good chance are you have almost everything set up correctly, except for one thing: JAVA. This error is a Windows OS environment issue at some level relating to JAVA. Maybe registry issue, old versions lurking somewhere….could be a dozen things. What it comes down to is your current JAVA install is hosed (or missing). Time to clean it up.

Fixing the Tableau, Windows JAVA Problem

As a test, we deployed a clean Windows 10 system. We wanted to make sure that we can get this working outside of someone's unique environment. There are too many variables trying to diagnose an issue on a company to company or user to user environment. If a clean install works, the problem is your Windows environment. : )

What we did for this test…

Amazon provides the ability to spin up remote desktops (https://clients.amazonworkspaces.com/) which is perfect for testing these types of issues. We used a basic, no frill Windows 10 machine with 8GB of ram. We got Tableau to Athena up in running in about 5 minutes on this clean install.

The process…

  1. First, make sure JAVA is NOT installed. In our clean install case, it was NOT installed. However, if it is installed you must remove it first. Explore using the uninstall tool from Oracle. Worse case you may need to clear any JAVA junk in the registry (thanks Windows). Just make sure it is removed.
  2. Next, make sure you installed the 64bit version of JAVA here https://www.java.com/en/download/manual.jsp and then grab Windows Offline (64-bit).
  3. Next, set the install path of JAVA to C:\Program Files\Java\jre1.8.0_211 (or whatever the version you are installing. This should auto-populate for you)
  4. Next, install the Tableau Trial version or use an existing Tableau install. (latest version of Tableau please)
  5. Next, download the 2.02 driver from Amazon and put it in the driver folder. The 2.02 driver seems more stable than 2.07. Just go with 2.02 for your test. Experiment with newer drivers later.
  6. Lastly, make sure Windows had JAVA_HOME set in system variables. Sometimes this is not set by the installer so you need to go to advanced settings and set it to JAVA_HOME with path C:\Program Files\Java\jre1.8.0_211
  7. Restart and then retry your connection in Tableau.

Attached are a few screens that highlight the text above.

Example Screenshots

Fresh JAVA x64 install location for Tableau and Athena:

Setting your Athena JAVA driver for Tableau

Set JAVA environment variables for Tableau (if they do not exist)

Athena and Tableau connection made!

Lastly, if this does not work, do not contact us to complain or ask for further troubleshooting your install. Reach out to Tableau support. Ultimately better support documentation or install processes need to come from them, not us. We are sharing this to help some people get unstuck from this error.

We have launched a code-free, zero-admin, fully automated data pipeline that automates database, table creation, Parquet file conversion, Snappy compression, partitioning and more.

Get started with Amazon Athena for free!

Visit us at www.openbridge.com to learn how we are helping other companies with their data efforts.