Ask AI

You are viewing an unreleased or outdated version of the documentation

Tableau (dagster-tableau)

Dagster allows you to represent your Tableau workspace as assets, alongside other your other technologies like dbt and Sling. This allows you to see how your Tableau assets are connected to your other data assets, and how changes to other data assets might impact your Tableau workspace.

Tableau API

Here, we provide interfaces to manage Tableau projects using the Tableau API.

Assets (Tableau API)

class dagster_tableau.TableauCloudWorkspace(*, connected_app_client_id, connected_app_secret_id, connected_app_secret_value, username, site_name, pod_name)[source]

experimental This API may break in future versions, even between dot releases.

Represents a workspace in Tableau Cloud and provides utilities to interact with Tableau APIs.

class dagster_tableau.TableauServerWorkspace(*, connected_app_client_id, connected_app_secret_id, connected_app_secret_value, username, site_name, server_name)[source]

experimental This API may break in future versions, even between dot releases.

Represents a workspace in Tableau Server and provides utilities to interact with Tableau APIs.

class dagster_tableau.DagsterTableauTranslator(context)[source]

Translator class which converts raw response data from the Tableau API into AssetSpecs. Subclass this class to implement custom logic for each type of Tableau content.

dagster_tableau.load_tableau_asset_specs(workspace, dagster_tableau_translator=<class 'dagster_tableau.translator.DagsterTableauTranslator'>)[source]

experimental This API may break in future versions, even between dot releases.

Returns a list of AssetSpecs representing the Tableau content in the workspace.

Parameters:
Returns:

The set of assets representing the Tableau content in the workspace.

Return type:

List[AssetSpec]

dagster_tableau.build_tableau_materializable_assets_definition(resource_key, specs, refreshable_workbook_ids=None)[source]

experimental This API may break in future versions, even between dot releases.

Returns the AssetsDefinition of the materializable assets in the Tableau workspace.

Parameters:
  • resource_key (str) – The resource key to use for the Tableau resource.

  • specs (Sequence[AssetSpec]) – The asset specs of the executable assets in the Tableau workspace.

  • refreshable_workbook_ids (Optional[Sequence[str]]) –

    A list of workbook IDs. The workbooks provided must have extracts as data sources and be refreshable in Tableau.

    When materializing your Tableau assets, the workbooks provided are refreshed, refreshing their sheets and dashboards before pulling their data in Dagster.

    This feature is equivalent to selecting Refreshing Extracts for a workbook in Tableau UI and only works for workbooks for which the data sources are extracts. See https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_workbooks_and_views.htm#update_workbook_now for documentation.

Returns:

The AssetsDefinition of the executable assets in the Tableau workspace.

Return type:

AssetsDefinition

dagster_tableau.parse_tableau_external_and_materializable_asset_specs(specs)[source]

Parses a list of Tableau AssetSpecs provided as input and return two lists of AssetSpecs, one for the Tableau external assets and another one for the Tableau materializable assets.

In Tableau, data sources are considered external assets, while sheets and dashboards are considered materializable assets.