Skip to main content

Google Sheets beta

Beta functionality

Google Sheets integration with the dbt Semantic Layer is a beta feature.

The dbt Semantic Layer offers a seamless integration with Google Sheets through a custom menu. This add-on allows you to build dbt Semantic Layer queries and return data on your metrics directly within Google Sheets.

Prerequisites

  • You have configured the dbt Semantic Layer and are using dbt v1.6 or higher.
  • You have a Google account with access to Google Sheets.
  • You can install Google add-ons.
  • You have a dbt Cloud Environment ID and a service token to authenticate with from a dbt Cloud account.
  • You must have a dbt Cloud Team or Enterprise account. Suitable for both Multi-tenant and Single-tenant deployment.
    • Single-tenant accounts should contact their account representative for necessary setup and enablement.
📹 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 (beta), Hex, and Mode.

Installing the add-on

  1. Navigate to the dbt Semantic Layer for Sheets App to install the add-on. You can also find it in Google Sheets by going to Extensions -> Add-on -> Get add-ons and searching for it there.

  2. After installing, open the Add-On menu and select the "dbt Semantic Layer for Sheets". This will open a custom menu on the right-hand side of your screen.

  3. Find your Host and Environment ID in dbt Cloud. Navigate to Account Settings and select Projects on the left sidebar. Select your project and then navigate to the Semantic Layer settings. You'll need this to authenticate in Google Sheets in the following step.

    • You can generate your service token by clicking Generate Service Token within the Semantic Layer configuration page or navigating to API tokens in dbt Cloud.
  4. In Google Sheets, authenticate with your host, dbt Cloud environment ID, and service token.

    Access your Environment ID, Host, and URLs in your dbt Cloud Semantic Layer settings. Generate a service token in the Semantic Layer settings or API tokens settingsAccess your Environment ID, Host, and URLs in your dbt Cloud Semantic Layer settings. Generate a service token in the Semantic Layer settings or API tokens settings
  5. Start querying your metrics using the Query Builder. For more info on the menu functions, refer to Custom menu functions.

When querying your data with Google Sheets:

  • It returns the data to the cell you have clicked on, and each cell where data is requested will have a note attached to it, indicating what has been queried.
  • The custom menu operation has a timeout limit of six (6) minutes.
  • If you're using this extension, make sure you're signed into Chrome with the same Google profile you used to set up the Add-On. Log in with one Google profile at a time as using multiple Google profiles at once might cause issues.

Custom menu functions

The custom menu provides the following capabilities:

Menu itemsDescription
MetricsSearch and select metrics.
Group BySearch and select dimensions to group by. Dimensions are grouped by the entity of the semantic model they come from.
Time RangeQuickly select time ranges to look at the data, which applies to the main time series for the metrics (metric time). You can still optionally use where to filter time ranges
GranularityModify the granularity of the primary time dimension.
WhereFilter your data. This includes categorical and time filters.
Order ByReturn your data order.
LimitSet a limit for the rows of your output.

Filtering data

To use the filter functionality, choose the dimension you want to filter by and select the operation you want to filter on.

  • For categorical dimensions, type in the dimension value you want to filter by (no quotes needed) and press enter.
  • Continue adding additional filters as needed with AND and OR. If it's a time dimension, choose the operator and select from the calendar.

Limited use policy disclosure

The dbt Semantic Layer for Sheet's use and transfer to any other app of information received from Google APIs will adhere to Google API Services User Data Policy, including the Limited Use requirements.

FAQs

0