- Download and install Tableau Desktop.
- Install and configure OpenSearch.
- Download the OpenSearch JDBC Driver.
Place the opensearch-sql-jdbc-x.x.x.x.jar
file in the folder for your operating system. (Create the folder if it doesn't already exist.)
Platform | Driver Path |
---|---|
Windows | C:\Program Files\Tableau\Drivers |
Mac | ~/Library/Tableau/Drivers |
Linux | /opt/tableau/tableau_driver/jdbc |
TDC file is required to add customization for the data connection. For reference, see the following sample opensearch.tdc
file.
<?xml version='1.0' encoding='utf-16' ?>
<connection-customization class='genericjdbc' enabled='true' version='2019.3'>
<vendor name='genericjdbc' />
<driver name='opensearch' />
<customizations>
<customization name='CAP_CREATE_TEMP_TABLES' value='no'/>
<customization name='CAP_SUPPRESS_DISCOVERY_QUERIES' value='yes' />
<customization name='CAP_SUPPRESS_DISPLAY_LIMITATIONS' value='yes'/>
<customization name='CAP_JDBC_SUPPRESS_ENUMERATE_DATABASES' value='yes' />
<customization name='CAP_JDBC_SUPPRESS_ENUMERATE_SCHEMAS' value='yes' />
<customization name='CAP_JDBC_SUPPRESS_EMPTY_CATALOG_NAME' value='yes' />
<customization name='CAP_JDBC_METADATA_READ_PRIMARYKEYS' value='no'/>
<customization name='CAP_QUERY_SUBQUERIES_WITH_TOP' value='yes'/>
</customizations>
</connection-customization>
- Using a text editor, add
<connection-customization>
section. - Name the file
opensearch.tdc
and save it toMy Tableau Repository\Datasources
. - Restart Tableau to apply the change.
For futher details check using a .tdc file with Tableau
You will need:
-
JDBC connection string to enter in the URL field when you connect.
Sample connection string for connecting to localhost:
jdbc:opensearch://localhost:9200
. -
Credentials for signing in to the server (user name and password).
-
(Optional) JDBC properties file to customize the driver behavior. For more details check Customize JDBC Connections Using a Properties File
- Create a properties file called
opensearch.properties
. - Save the file to the
My Tableau Repository\Datasources
directory.
- Create a properties file called
- Start Tableau and under Connect, select Other Databases (JDBC). If not visible, select More under To a Server to find it in the list.
- Enter the JDBC connection string in the URL field.
- Select the Dialect as MySQL from the drop-down list.
- Enter the user name and password for signing into the server.
- (Optional) Browse to the JDBC properties file.
- Select Sign in
- Select a single table by double-clicking or dragging the required table to the canvas.
- To add data from two or more tables:
- Double click or drag tables to canvas.
- Select the desired type of join operation. Tableau supports inner join, right join, left join and full outer join.
- Select columns for join. (For meaningful result, type of column should be the same.)
- Select Sheet 1 on the bottom left corner.
- Double click or drag desired fields under Measure.
- Double click or drag desired fields under Dimensions.
- Select available visualization under Show Me.