Skip to main content

Tableau

Extract Tableau metadata into Catalog using the castor-extractor package.

Prerequisites

Installation Required

Follow the castor-extractor installation instructions before running the extraction.

  • Get Tableau credentials with role superuser

Run Extraction Script

Once the package has been installed, you should be able to run the following command in your terminal:

castor-extract-tableau [arguments]

The script will run and display logs as following:

INFO - Logging in using user and password authentication
INFO - Signed into https://eu-west-1a.online.tableau.com as user with id ****
INFO - Extracting USER from Tableau API
INFO - Fetching USER
INFO - Querying all users on site

...

INFO - Wrote output file: /tmp/catalog/1649078755-custom_sql_queries.json
INFO - Wrote output file: /tmp/catalog/1649078755-summary.json

Credentials

You can sign in using one of the following methods:

  • user and password
    • -u, --username: Tableau username
    • -p, --password: Tableau password
  • Tableau personal access token (PAT)
    • -n, --token-name: Tableau token name
    • -t, --token: Tableau token

Other Arguments

  • -b, --server-url: Tableau base URL (your API endpoint, usually your Tableau homepage; for example, https://eu-west-1a.online.tableau.com)
  • -i, --site-id: Tableau Site ID, is empty if your site if the default one
  • -o, --output: Target folder to store the extracted files

Optional Arguments

  • --with-pulse: Option to extract Tableau Pulse assets: Metrics and Subscriptions
  • --page-size: Option to override the page size used in the pagination, to be used it extraction hits the node limit for a request in Tableau
  • --skip-columns: Option to avoid extracting Tableau columns, default to False
Help

You can also get help with the --help argument.

Use ENV Variables

If you don't want to specify arguments every time, you can set the following ENV in your .bashrc:

CASTOR_TABLEAU_USER
CASTOR_TABLEAU_PASSWORD
CASTOR_TABLEAU_TOKEN_NAME
CASTOR_TABLEAU_TOKEN
CASTOR_TABLEAU_SERVER_URL
CASTOR_TABLEAU_SITE_ID

CASTOR_OUTPUT_DIRECTORY

Then the script can be executed without any arguments:

castor-extract-tableau

It can also be executed with partial arguments (the script looks in your ENV as a fallback):

castor-extract-tableau --output /tmp/catalog