Tableau CLI

The Paradime SDK provides CLI commands to interact with Tableau, allowing you to refresh workbooks and data sources, and list available resources.

Refresh Tableau Resources

Trigger refreshes for Tableau workbooks or data sources with monitoring capabilities.

CLI Command

paradime run tableau-refresh

Options

Flag
Type
Description

--site-name

Optional, TEXT

The name of the Tableau site. Only set this if using a site other than the default site. Can be set via TABLEAU_SITE_NAME environment variable.

--workbook-name

Optional, TEXT (multiple)

The name or UUID of the workbook(s) you want to refresh. Can specify multiple workbooks.

--datasource-name

Optional, TEXT (multiple)

The name or UUID of the data source(s) you want to refresh. Can specify multiple data sources.

--host

Required, TEXT

The base URL of your Tableau server (e.g., https://prod-uk-a.online.tableau.com/). Can be set via TABLEAU_HOST environment variable.

--personal-access-token-secret

Required, TEXT

Your Tableau personal access token secret. Can be set via TABLEAU_PERSONAL_ACCESS_TOKEN_SECRET environment variable.

--personal-access-token-name

Required, TEXT

Your Tableau personal access token name. Can be set via TABLEAU_PERSONAL_ACCESS_TOKEN_NAME environment variable.

--wait-for-completion / --no-wait-for-completion

Optional, Flag

Wait for the refresh job to complete before returning. Shows progress and final status. Default: --wait-for-completion.

--timeout-minutes

Optional, INTEGER

Maximum time to wait for refresh completion (in minutes). Only used with --wait-for-completion. Default: 30. Can be set via TABLEAU_REFRESH_TIMEOUT_MINUTES environment variable.

Recommended Setup

For security and convenience, set your Tableau credentials as environment variables:

TABLEAU_HOST="https://prod-uk-a.online.tableau.com/"
TABLEAU_PERSONAL_ACCESS_TOKEN_NAME="mytoken"
TABLEAU_PERSONAL_ACCESS_TOKEN_SECRET="mysecret"
TABLEAU_SITE_NAME="mys-site"  # Optional, only if using non-default site

Workbook Refresh Examples

Refresh a single workbook by name

# Using environment variables (recommended)
paradime run tableau-refresh --workbook-name "Sales Dashboard"

# Or with explicit flags
paradime run tableau-refresh \
  --host "https://prod-uk-a.online.tableau.com/" \
  --personal-access-token-name "mytoken" \
  --personal-access-token-secret "mysecret" \
  --workbook-name "Sales Dashboard"

Refresh a workbook by UUID

# Using environment variables (recommended)
paradime run tableau-refresh --workbook-name "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

# Or with explicit flags
paradime run tableau-refresh \
  --host "https://tableau.company.com/" \
  --personal-access-token-name "mytoken" \
  --personal-access-token-secret "mysecret" \
  --workbook-name "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Data Source Refresh Examples

Refresh a single data source by name

# Using environment variables (recommended)
paradime run tableau-refresh --datasource-name "Sales Data"

# Or with explicit flags
paradime run tableau-refresh \
  --host "https://tableau.company.com/" \
  --personal-access-token-name "mytoken" \
  --personal-access-token-secret "mysecret" \
  --datasource-name "Sales Data"

Refresh a data source by UUID

# Using environment variables (recommended)
paradime run tableau-refresh --datasource-name "12345678-1234-1234-1234-123456789012"

# Or with explicit flags
paradime run tableau-refresh \
  --host "https://tableau.company.com/" \
  --personal-access-token-name "mytoken" \
  --personal-access-token-secret "mysecret" \
  --datasource-name "12345678-1234-1234-1234-123456789012"

Sample Output

List Tableau Workbooks

List all available Tableau workbooks with their names, UUIDs, and project information.

CLI Command

paradime run tableau-list-workbooks

Options

Flag
Type
Description

--site-name

Optional, TEXT

The name of the Tableau site. Only set this if using a site other than the default site. Can be set via TABLEAU_SITE_NAME environment variable.

--host

Required, TEXT

The base URL of your Tableau server (e.g., https://prod-uk-a.online.tableau.com/). Can be set via TABLEAU_HOST environment variable.

--personal-access-token-secret

Required, TEXT

Your Tableau personal access token secret. Can be set via TABLEAU_PERSONAL_ACCESS_TOKEN_SECRET environment variable.

--personal-access-token-name

Required, TEXT

Your Tableau personal access token name. Can be set via TABLEAU_PERSONAL_ACCESS_TOKEN_NAME environment variable.

Usage Example

# Using environment variables (recommended)
paradime run tableau-list-workbooks

# Or with explicit flags
paradime run tableau-list-workbooks \
  --host "https://prod-uk-a.online.tableau.com/" \
  --personal-access-token-name "mytoken" \
  --personal-access-token-secret "mysecret"

Sample Output

List Tableau Data Sources

List all available Tableau data sources with their names, UUIDs, types, and project information.

CLI Command

paradime run tableau-list-datasources

Options

Flag
Type
Description

--site-name

Optional, TEXT

The name of the Tableau site. Only set this if using a site other than the default site. Can be set via TABLEAU_SITE_NAME environment variable.

--host

Required, TEXT

The base URL of your Tableau server (e.g., https://prod-uk-a.online.tableau.com/). Can be set via TABLEAU_HOST environment variable.

--personal-access-token-secret

Required, TEXT

Your Tableau personal access token secret. Can be set via TABLEAU_PERSONAL_ACCESS_TOKEN_SECRET environment variable.

--personal-access-token-name

Required, TEXT

Your Tableau personal access token name. Can be set via TABLEAU_PERSONAL_ACCESS_TOKEN_NAME environment variable.

Usage Example

# Using environment variables (recommended)
paradime run tableau-list-datasources

# Or with explicit flags
paradime run tableau-list-datasources \
  --host "https://prod-uk-a.online.tableau.com/" \
  --personal-access-token-name "mytoken" \
  --personal-access-token-secret "mysecret"

Sample Output

Important Notes

  • Resource Identification: Both workbook and data source names and UUIDs are supported interchangeably in refresh commands.

  • Site Management: If you're using Tableau Server with multiple sites, specify the site name. For Tableau Online or default sites, you can omit this parameter.

  • Job Monitoring: When --wait-for-completion is enabled, the CLI will monitor refresh job progress and provide detailed status updates.

  • Environment Variables: All authentication parameters can be set as environment variables for security and convenience.

Environment Variable Reference

Environment Variable
Description

TABLEAU_HOST

Base URL of your Tableau server

TABLEAU_PERSONAL_ACCESS_TOKEN_NAME

Personal access token name

TABLEAU_PERSONAL_ACCESS_TOKEN_SECRET

Personal access token secret

TABLEAU_SITE_NAME

Tableau site name (optional)

TABLEAU_REFRESH_TIMEOUT_MINUTES

Refresh timeout in minutes (default: 30)

Workflow Integration

These Tableau CLI commands are designed to integrate seamlessly into your data pipeline workflows. Common use cases include:

  1. Post-dbt Refresh: Trigger Tableau refreshes after dbt model runs complete

  2. Scheduled Data Updates: Automate regular refresh cycles for critical dashboards

  3. CI/CD Integration: Include Tableau refreshes in your deployment pipelines

  4. Resource Discovery: Use list commands to programmatically discover available workbooks and data sources

For more information about integrating Tableau refreshes into your Paradime workflows, see the Bolt Schedules documentation.

Last updated

Was this helpful?