JDBC TUTORIAL

How to Connect Tableau to GitHub

Updated: 02 Feb 2024

Leverage GitHub data with Tableau

GitHub is a leading software development platform that enables developers to manage code and collaborate on projects. Business analytics tools such as Tableau, Tibco, and SAP Lumira can be used to visualize the data generated by GitHub, transforming it into valuable business insights. However, a key challenge in visualizing GitHub data with analytics tools is the ability to connect to and securely access the data. The Autonomous REST Connector from Progress DataDirect offers a secure, flexible solution for connecting to Tableau to GitHub. The Autonomous REST Connector achieves this by exposing GitHub data in a tabular scheme that Tableau can execute SQL queries against. This tutorial walks you through the process of connecting Tableau to GitHub using the JDBC connector (or driver) on Windows. The following topics are covered:

  • GitHub authentication
  • Download and install Autonomous REST Connector for Windows
  • Select the GitHub model and create a connection
  • Connect Tableau to GitHub

GitHub authentication

To use the GitHub API to access data with Tableau, you must use a valid form of authentication. For GitHub, the Autonomous REST Connector supports Bearer Token and OAuth 2.0 authentication.

Bearer Token

Bearer token authentication allows you to use a GitHub token to access data using the GitHub API. To generate the required token, navigate to the GitHub personal access tokens page: https://github.com/settings/tokens. Save the token to configure your connection to GitHub as described in "Select the GitHub model and create a connection" below.

OAuth 2.0

Before you can use OAuth 2.0 authentication, you must register Tableau as a third-party application. During the registration process, you must obtain the client ID, client secret, authorization URI, and Token URI. To register Tableau and obtain these values, navigate to https://github.com/settings/applications/ (you must have the required privileges to register an application). Save this information to configure your connection to GitHub as described in "Select the GitHub model and create a connection" below.

Download and install Autonomous REST Connector for Windows

  1. Click the TRY NOW button.
  2. The Autonomous REST Connector for JDBC provides JDBC connectivity to GitHub and many other REST APIs.

  3. Provide the required information; then, click DOWNLOAD. The download link is sent to you via email.
  4. Download the connector zip file and extract its contents into a temporary directory; then, double-click the installer program: PROGRESS_DATADIRECT_JDBC_INSTALL.exe
  5. Follow the prompts to complete the installation.

Select the GitHub model and create a connection

  1. Open the Autonomous REST Composer by selecting the Autonomous REST Composer (JDBC) icon from your desktop or the Windows Start menu. The Autonomous REST Composer opens in your default web browser.

    Note: The Autonomous REST Composer is the Autonomous REST Connector's interface for selecting or building REST API models.

  2. Type GitHub in the search field; then, select the GitHub model. The Connection tab for the GitHub model opens.
  3. Provide a value for the Server Name property. The value should be the host name portion of the HTTP endpoint to which you send requests. It should not include the preceding portion of the URL: https://. For the GitHub model, the default isFor example, a GitHub endpoint would take the following form: api.github.com.
  4. From the Authentication Method drop-down, select the authentication method you are using. The properties related to the selected method are exposed.

    Bearer Token Authentication
    Enter the token in the Security Token field.
    Note: You may generate the required token from the GitHub personal access tokens page: https://github.com/settings/applications/.

    OAuth2 Authentication

    1. Provide values for the following properties:
      Note: Most values should be obtained by registering your application from the applications page: https://github.com/settings/applications/.
      • Client ID: This value is generated during the app registration process.
      • Client Secret: This value is generated during the app registration process.
      • Authorization URI: The standard value is https://github.com/login/oauth/authorize.
      • Token URI: The standard value is https://github.com/login/oauth/access_token.
      • Redirect URI: Use the value http://localhost to return token values to the Autonomous REST Connector. These values may be used in your JDBC connection string.
    2. Press Fetch OAuth Token to retrieve GitHub access and refresh tokens.
      • In some cases, the GitHub authorization screen will appear. If so, provide consent.
      • The Access Token and Refresh Token fields will populate with token values.
  5. Set the values for any optional properties that you want to configure.
  6. To test your configuration:
    1. Click Test Connect or select the SQL Editor tab from the side menu.
    2. From the SQL Editor screen, expand AUTOREST in the Schema Tree pane to view a list of tables showing GitHub data exposed by the connector.
    3. In the Editor pane, specify a query that you would like to test.
    4. Click Execute.
      Note: If successful, the driver will return your results in the Results pane.
  7. Download your model file:
    1. Select the Configure Endpoints tab.
    2. Optionally, add, remove, or edit endpoints that are used to return data for use with SQL-based applications.
    3. Click Download to save your model file.

    Note: When configuring the connection to GitHub in Tableau, you will need to specify the fully qualified path to your GitHub model file in the Tableau connection URL. The connection string generated by the Autonomous REST Composer does not automatically provide the path.

  8. As you provide values for properties, the Composer generates a connection string. You may use this connection string as the basis for the Tableau connection to GitHub. Take the following steps to prepare the Tableau connection URL:
    1. On the Set Authentication tab, click the copy button and paste the connection string into a text editor.
    2. Replace the server name information (servername=api.github.com) with the fully qualified path to your GitHub model file using the Config property (Config='C:\Users\windows-user\Downloads\GitHub.rest'). The revised connection string may be used as the Tableau connection URL. For example:

      Bearer Token
       jdbc:datadirect:autorest:Config='C:\Users\windows-user\Downloads\GitHub.rest';AuthenticationMethod=BearerToken;SecurityToken=github-api-token;
      OAuth2
      jdbc:datadirect:autorest:Config='C:\Users\windows-user\Downloads\GitHub.rest';AuthenticationMethod=OAuth2;ClientID=xxxxxxxx;ClientSecret=xxxxxxxx;AccessToken=xxxxxxxx;RefreshToken=xxxxxxxx;AuthURI=https://github.com/login/oauth/authorize;TokenURI=https://github.com/login/oauth/access_token;RedirectURI=http://localhost;

Connect Tableau to GitHub

Before you begin, you must have Tableau Desktop installed. You may download and install Tableau Desktop from the Tableau Desktop Trial page.

  1. Navigate to the \lib\xx subdirectory of the Progress DataDirect installation directory; then, locate the autorest.jar file. This is the Autonomous REST Connector driver jar file.
  2. Copy the autorest.jar file into the following directory:
    C:\Program Files\Tableau\Drivers
  3. Open Tableau. From the Connect menu, select Other Databases (JDBC).
  4. In the Other Databases (JDBC) dialog, provide values for the following fields; then, click Sign In.
    • URL: Copy and paste your connection URL into this field. For example:

      Bearer Token
       jdbc:datadirect:autorest:Config='C:\Users\windows-user\Downloads\GitHub.rest';AuthenticationMethod=BearerToken;SecurityToken=github-api-token;
      OAuth2
      jdbc:datadirect:autorest:Config='C:\Users\windows-user\Downloads\GitHub.rest';AuthenticationMethod=OAuth2;ClientID=xxxxxxxx;ClientSecret=xxxxxxxx;AccessToken=xxxxxxxx;RefreshToken=xxxxxxxx;AuthURI=https://github.com/login/oauth/authorize;TokenURI=https://github.com/login/oauth/access_token;RedirectURI=http://localhost;
    • Dialect: Select SQL92 (the default) from the drop-down box.

    The connection string generated by the Autonomous REST Connector may be used as the basis of the Tableau connection URL. The connection string must be modified such that the server name information (servername=api.github.com) is replaced with the fully qualified path to your GitHub model file using the Config property (Config='C:\Users\windows-user\Downloads\GitHub.rest'). Downloading the GitHub model file is described in Step 7 in the preceding section.
  5. The Data Source window appears. In the Schema field, select the schema for the service you want to use.
  6. In the Table field, the tables stored in the selected schema are now exposed and available for selection.

Result: You have successfully accessed your data and are now ready to create reports with Tableau. For more information, refer to the Tableau product documentation at http://www.tableau.com/support/help.

More Information

More Information

Thank you for taking the time to consider the Progress DataDirect solution for connecting Tableau to GitHub. Please contact us for additional information. Click the LEARN MORE button for additional product resources.

The Autonomous REST Connector provides JDBC and ODBC connectivity to GitHub, Jira, Azure, and many other REST APIs.

Connect any application to any data source anywhere

Explore all DataDirect Connectors

Need additional help with your product?

Get Customer Support