Skip navigation

Bryant Howell's Blog

August 2014 Previous month Next month

There are many different community posts regarding iSeries DB2 connections in Tableau. In general, using the IBM Client Access ODBC driver, a user can connect to single tables but not multiple tables or custom sql without creating a custom TDC file. However, there are many different versions of the driver from over the years (IBM even changed the name at one point), so giving out a generic TDC isn't that effective. The following is a method I've used with 100% success in enabling JOINs and Custom SQL.


As always, Tableau recommends taking an extract with an ODBC driver. In this case, performance will be excellent but Tableau writes increasingly complex queries the more complex your analysis / viz, so eventually you might hit an ODBC driver error. Taking an extract removes this problem entirely.



Use Single Table connection to get customizations in TDS file

To do the correct ODBC customizations, you need to build a TDC file. But what customizations should you use? When we connect successfully to a single table, Tableau actually tests the ODBC driver for all of its capabilities. Saving the data source to a .TDS file will output those customizations in the exact format we need to make a TDC file.


  1. Connect to Single Table – Connect Live
  2. Save the data connection
  3. Find .TDS(X) in My Tableau Repository\Datasources
  4. If .TDSX, unzip and open the .TDS file


Build TDC from the TDS File


  1. Open the saved .tds file. It will be XML
  2. Open a new text file (use Notepad++ / SublimeText/ your favorite editor if possible, or Notepad if you have to)
  3. Copy the first line (the xml declaration) from the tds to your new tdc file
  4. Find the <connection-customization> tag. Highlight it and go all the way until you find a </connection-customization> tag. Copy this into the new .tdc file.
  5. Change “enabled=‘false’ “ to “enabled=‘true’ “ in the <connection-customization> tag
  6. Save the new file in \Datasources with the .tdc file extension (Make sure if using Notepad that Windows isn’t adding .txt to the end!)
  7. Find the customization named CAP_SUPPRESS_DISCOVERY_QUERIES and set to 'yes':  <customization name='CAP_SUPPRESS_DISCOVERY_QUERIES' value='yes' />
  8. Save again.
  9. Restart Tableau, try multiple tables JOIN
  10. Extract



  1. When Tableau restarts, you should see a mention of “TDC” in the logs
  2. When you try your ODBC connection again, there will be a line: “Found matching TDC…” . Search for this!
  3. If you don't see this line, make sure that the .TDC file is saved with the .TDC extension and nothing else. A hidden ".txt" ending can be added by some programs and hidden by Windows, and Tableau won't find the file.

Tableau's polygon mark type allows you to create interactive mappings -- we've seen stadiums, localized maps, floorplans and retail planograms all built out as vizes. But plotting out the X and Y coordinates can be a task -- there are a few techniques, but unless you have access to Vizio or another tool for drawing, there's a lot of manual guesswork.


Attached to this blog post is a completely browser based tool (tested in Firefox and Chrome) for directly drawing polygons onto an image. At the end it outputs a CSV file with all the vertices and the correct settings for the Background Image dialog. You do have to download it to your own computer -- that's the only way for the browser to have access to your local files (yes HTML5 exists but...)


Polygon Mapper snapshot.png



Installation Instructions


  1. Extract the attached file "" to a folder on your computer
  2. Rename “jquery.svg.txt” to “jquery.svg.js” . Say yes if Windows asks if you are really sure
  3. Rename “jquery-1.10.2.min.txt” to “jquery-1.10.2.min.js” . Say yes if Windows asks if you are really sure
  4. Put whatever image you want to map over into the extract folder. Image must be in the same folder as the html and js files.
  5. Open up the polygon_mapper.html file in Firefox or Safari (haven’t tested in IE)
  6. Follow the instructions on the page. Click on points on the page to draw the lines of your polygon. The tool fills the line from point to point. You don't have to connect the last point back to the first -- just right-click to complete it. Then give the polygon a name that you can blend to from another data source.
  7. Load the CSV in Tableau, set up your background image and blend data against it


How It Works


All of the functional code is in the polygon_mapper.html, with full commenting. The drawing library is jQuery SVG , on top of a standard jQuery library. The main challenge is finding the relative placement of the mouse compared to the image itself. A web browser calculates all distances from Top and Left. The Left calculations are unchanged for Tableau (assuming we start at 0 on the X-axis), but Tableau calculates Y distances from the bottom rather than the top.

     // relX/Y is the "real place" on the image; i.e. without any other page spacing affecting it
               mouse_x = e.pageX;
               mouse_y = e.pageY;
               var relX = e.pageX - parentOffset.left;
               var relY = e.pageY -;
               // Tableau goes from bottom to top (starting at 0), so y-axis is the height minus distance from top
               tableau_x = relX;
               tableau_y = img_height - relY;


From that point on we keep two distinct arrays -- one for the SVG drawing using Top values, and one for the Tableau polygons using 0-starting Y values. Display is this separate from the Tableau output -- the tool draws the final line to the original vertex, but we don't generate a row for that Vertex since Tableau handles the closing of the polygon automatically.