Skip to content

Commit

Permalink
DO NOT MERGE - Update gsheets.md (#5378)
Browse files Browse the repository at this point in the history
Google Sheets updates

Merge status: Do not merge this PR. Waiting on PM to give merge go ahead
as they're still working through things.

## What are you changing in this pull request and why?
<!---
Describe your changes and why you're making them. If related to an open 
issue or a pull request on dbt Core, then link to them here! 

To learn more about the writing conventions used in the dbt Labs docs,
see the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md).
-->

## Checklist
<!--
Uncomment when publishing docs for a prerelease version of dbt:
- [ ] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)
-->
- [ ] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [ ] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
- [ ] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."

Adding or removing pages (delete if not applicable):
- [ ] Add/remove page in `website/sidebars.js`
- [ ] Provide a unique filename for new pages
- [ ] Add an entry for deleted pages in `website/vercel.json`
- [ ] Run link testing locally with `npm run build` to update the links
that point to deleted pages
  • Loading branch information
mirnawong1 authored May 3, 2024
2 parents 4cd9582 + d341f41 commit b680b74
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
29 changes: 14 additions & 15 deletions website/docs/docs/use-dbt-semantic-layer/gsheets.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
---
title: "Google Sheets (beta)"
title: "Google Sheets"
description: "Integrate with Google Sheets to query your metrics in a spreadsheet."
tags: [Semantic Layer]
sidebar_label: "Google Sheets (Preview)"
sidebar_label: "Google Sheets"
---

# Google Sheets <Lifecycle status='preview'/>

:::info Preview functionality
Google Sheets integration with the dbt Semantic Layer is a [Preview](/docs/dbt-versions/product-lifecycles#dbt-cloud) 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.

Expand Down Expand Up @@ -38,7 +33,7 @@ import SLCourses from '/snippets/_sl-course.md';
4. In Google Sheets, authenticate with your host, dbt Cloud environment ID, and service token.
<Lightbox src="/img/docs/dbt-cloud/semantic-layer/sl-and-gsheets.jpg" width="70%" title="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 settings" />

5. Start querying your metrics using the **Query Builder**. For more info on the menu functions, refer to [Query Builder functions](#query-builder-functions).
5. Start querying your metrics using the **Query Builder**. For more info on the menu functions, refer to [Query Builder functions](#query-builder-functions). To cancel a query while running, press the "Cancel" button.

When querying your data with Google Sheets:

Expand All @@ -53,18 +48,22 @@ The Google Sheets **Query Builder** custom menu has the following capabilities:
| Menu items | Description |
|---------------|-------------------------------------------------------|
| Metrics | Search and select metrics. |
| Group By | Search and select dimensions or entities to group by. Dimensions are grouped by the entity of the semantic model they come from. |
| Time Range | Quickly 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|
| Group By | Search and select dimensions or entities to group by. Dimensions are grouped by the entity of the semantic model they come from. You may choose dimensions on their own without metrics. |
| Time Range | Quickly select time ranges to look at the data, which applies to the main time series for the metrics (metric time), or do more advanced filter using the "Custom" selection|
| Granularity | Modify the granularity of the primary time dimension. |
| Where | Filter your data. This includes categorical and time filters. |
| Order By | Return your data order. |
| Limit | Set a limit for the rows of your output. |



**Filtering data**

To use the filter functionality, choose the [dimension](docs/build/dimensions) 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.
- For categorical dimensions, you can type a value into search or select from a populated list. For entities, you must type the value you are looking for as we do not load all of them given the large number of values.
- Continue adding additional filters as needed with AND and OR.

For time dimensions, you can use the time range selector to filter on presets or custom options. The time range selector applies only to the primary time dimension (`metric_time`). For all other time dimensions that aren't `metric_time`, you can use the "Where" option to apply filters.

**Querying without headers or columns**

Expand All @@ -85,14 +84,14 @@ You can also make these selections private or public:

### Refreshing selections

Set your saved selections to automatically refresh every time you load the addon. You can do this by selecting **Refresh on Load** when creating the saved selection.
Set your saved selections to automatically refresh every time you load the addon. You can do this by selecting **Refresh on Load** when creating the saved selection. When you access the addon and have saved selections that should refresh, you'll see "Loading..." in the cells that are refreshing.

Public saved selections will refresh for anyone who edits the sheet, while private selections will only update for the user who created it.
Public saved selections will refresh for anyone who edits the sheet while private selections will only update for the user who created it.

:::tip What's the difference between saved queries and saved selections?

- Saved selections are saved components that you can create only when using the Google Sheets application.
- Saved queries, explained in the next section, are code-defined sections of data that you can easily access. You can use the results from a saved query to create a saved selection.
- Saved queries, explained in the next section, are code-defined sections of data you create in your dbt project that you can easily access and use for building selections. You can also use the results from a saved query to create a saved selection.
:::

## Using saved queries
Expand Down
2 changes: 1 addition & 1 deletion website/snippets/_sl-partner-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The following tools integrate with the dbt Semantic Layer:
icon="tableau-software"/>

<Card
title="Google Sheets (Preview)"
title="Google Sheets"
link="/docs/use-dbt-semantic-layer/gsheets"
body="Discover how to connect to Google Sheets for querying metrics and collaborating with your team."
icon="google-sheets-logo-icon"/>
Expand Down

0 comments on commit b680b74

Please sign in to comment.