Test your connectivity with the Tableau server

Before you run the lineage harvester, you need to test your connectivity with the Tableau server.

Connectivity requires authentication. The user/token that you intend to use to ingest Tableau assets must be able to authenticate to your Tableau APIs via the command line, from the server on which you intend to install and run the lineage harvester.

Warning As of October 2022, Tableau is enforcing multi-factor authentication for Tableau Cloud Admin users. However, the lineage harvester doesn’t support multi-factor authentication. Therefore, Tableau Cloud users with an Admin role must use token-based authentication. This does not affect Tableau Server users or Tableau Cloud users with an Explorer role.

Important By default, your Tableau token is valid for one year; however, you must use the token at least once every two weeks for it to remain valid. If a token is unused for two weeks, it expires. The life of a token can never be greater than one year, but you can configure it to be less than a year. The two-week usage frequency condition remains valid, regardless.

To ensure that you can authenticate and connect to the Tableau server, try the following procedures.

Make the signin API call using a cURL command

  1. Create a JSON file called "signin.json".
    The file should contain the following:
    • For username/password authentication:
      {
      	"credentials": {
      		"name": "YOUR_USER",
      		"password": "YOUR_PASSWORD",
      		"site": {
      			"contentUrl": "YOUR_SITE_ID"
      		}
      	}
      }				
    • For personal token-based authentication:
      {
      	"credentials": {
      		"personalAccessTokenName": "YOUR_TOKEN_NAME",
      		"personalAccessTokenSecret": "YOUR_TOKEN_SECRET",
      		"site": {
      			"contentUrl": "YOUR_SITE_ID"
      		}
      	}
      }				
  2. Test this on your machine by running the following command:
    curl "https://YOUR_TABLEAU_URL/api/3.7/auth/signin" -H "Content-Type: application/json" -X POST -d @signin.json
    Tip To test on a Windows machine, you need to:
    1. Download and install the cURL Command-Line Tool.
    2. In Windows, click Start > Run, and then enter cmd in the Run dialog box.
    3. Run the following command:
      curl "https://YOUR_TABLEAU_URL/api/3.7/auth/signin" -H "Content-Type: application/json" -X POST -d @signin.json

Check the login request that the lineage harvester sends to the Tableau server

  1. Run the lineage harvester with the following parameters:

    bin/lineage-harvester load-sources -Dakka.http.client.log-unencrypted-network-bytes=1024 -Dakka.loglevel=DEBUG

    This generates many logs. In the log file, search for “signin”. The entry for “signin” will resemble the following log snippet, in which the login request is shown between curly brackets "{}":

    [DEBUG] [11/08/2021 14:03:18.411] [default-akka.actor.default-dispatcher-4] [akka.stream.Log(akka://default/system/StreamSupervisor-1)] [client-plain-text ToNet  ] Element: SendBytes  ByteString(375 bytes)
    50 4F 53 54 20 2F 61 70 69 2F 33 2E 37 2F 61 75  | POST /api/3.7/au
    74 68 2F 73 69 67 6E 69 6E 20 48 54 54 50 2F 31  | th/signin HTTP/1
    
  2. Verify that the request is the same as the one you used in the signin.json file.