Skip to main content

Tableau StarterEnterpriseEnterprise +

The Tableau integration allows you to use worksheets to query the Semantic Layer directly and produce your dashboards with trusted data. It provides a live connection to the Semantic Layer through Tableau Desktop or Tableau Server.

Prerequisites

📹 Learn about the dbt Semantic Layer with on-demand video courses!

Explore our dbt Semantic Layer on-demand course to learn how to define and query metrics in your dbt project.

Additionally, dive into mini-courses for querying the dbt Semantic Layer in your favorite tools: Tableau, Excel, Hex, and Mode.

Installing the connector

The Semantic Layer Tableau connector is available to download directly on Tableau Exchange. The connector is supported in Tableau Desktop, Tableau Server, and Tableau Cloud.

Alternatively, you can follow these steps to install the connector. Note that these steps only apply to Tableau Desktop and Tableau Server. The connector for Tableau Cloud is managed by Tableau.

  1. Download the GitHub connector file locally and add it to your default folder:
Operating systemTableau DesktopTableau Server
WindowsC:\Users\\[Windows User]\Documents\My Tableau Repository\ConnectorsC:\Program Files\Tableau\Connectors
Mac/Users/[user]/Documents/My Tableau Repository/ConnectorsNot applicable
Linux/opt/tableau/connectors/opt/tableau/connectors
  1. Install the JDBC driver to the folder based on your operating system:
    • Windows: C:\Program Files\Tableau\Drivers
    • Mac: ~/Library/Tableau/Drivers or /Library/JDBC or ~/Library/JDBC
    • Linux: /opt/tableau/tableau_driver/jdbc
  2. Open Tableau Desktop or Tableau Server and find the Semantic Layer by dbt Labs connector on the left-hand side. You may need to restart these applications for the connector to be available.
  3. Connect with your Host, Environment ID, and service or personal token information dbt provides during the Semantic Layer configuration.
    • In Tableau Server, the authentication screen may show "User" & "Password" instead, in which case the User is the Environment ID and the password is the Service Token.

Using the integration

  1. Authentication — Once you authenticate, the system will direct you to the data source page.
  2. Access all Semantic Layer Objects — Use the "ALL" data source to access all the metrics, dimensions, and entities configured in your Semantic Layer. Note that the "METRICS_AND_DIMENSIONS" data source has been deprecated and replaced by "ALL". Be sure to use a live connection since extracts are not supported at this time.
  3. Access saved queries — You can optionally access individual saved queries that you've defined. These will also show up as unique data sources when you log in.
  4. Access worksheet — From your data source selection, go directly to a worksheet in the bottom left-hand corner.
  5. Query metrics and dimensions — Then, you'll find all the metrics, dimensions, and entities that are available to query on the left side of your window based on your selection.

Visit the Tableau documentation to learn more about how to use Tableau worksheets and dashboards.

Publish from Tableau Desktop to Tableau Server

  • From Desktop to Server — Like any Tableau workflow, you can publish your workbook from Tableau Desktop to Tableau Server. For step-by-step instructions, visit Tableau's publishing guide.

Things to note

Aggregation

  • All metrics are shown as using the "SUM" aggregation type in Tableau's UI, and this cannot be altered using Tableau's interface.
  • The Semantic Layer controls the aggregation type in code and it is intentionally fixed. Keep in mind that the underlying aggregation in the Semantic Layer might not be "SUM" ("SUM" is Tableau's default).

Data sources and display

  • In the "ALL" data source, Tableau surfaces all metrics and dimensions from the Semantic Layer on the left-hand side. Note, that not all metrics and dimensions can be combined. You will receive an error message if a particular dimension cannot be sliced with a metric (or vice versa). You can use saved queries for smaller pieces of data that you want to combine.
  • To display available metrics and dimensions, Semantic Layer returns metadata for a fake table with the dimensions and metrics as 'columns' on this table. Because of this, you can't actually query this table for previews or extracts.

Calculations and querying

  • Certain Table calculations like "Totals" and "Percent Of" may not be accurate when using metrics aggregated in a non-additive way (such as count distinct)
  • In any of our Semantic Layer interfaces (not only Tableau), you must include a time dimension when working with any cumulative metric that has a time window or granularity.
  • We can support calculated fields for creating parameter filters or dynamically selecting metrics and dimensions. However, other uses of calculated fields are not supported.
    • Note: For calculated field use cases that are not currently covered, please reach out to dbt Support and share them so we can further understand.
  • When using saved queries that include filters, we will automatically apply any filters that the query has.

Unsupported functionality

The following Tableau features aren't supported at this time, however, the Semantic Layer may support some of this functionality in a future release:

  • Updating the data source page
  • Using "Extract" mode to view your data
  • Unioning Tables
  • Writing Custom SQL / Initial SQL
  • Table Extensions
  • Cross-Database Joins
  • Some functions in Analysis --> Create Calculated Field
  • Filtering on a Date Part time dimension for a Cumulative metric type
  • Changing your date dimension to use "Week Number"
  • Performing joins between tables that the Semantic Layer creates. It handles joins for you, so there's no need to join components in the Semantic Layer. Note, that you can join tables from the Semantic Layer to ones outside your data platform.
  • The Tableau integration doesn't currently display descriptive labels defined in your metrics configuration, meaning custom labels won't be visible when those metrics are imported/queried into Tableau.

FAQs

I'm receiving an `Failed ALPN` error when trying to connect to the dbt Semantic Layer.
0