Skip to content

Commit

Permalink
Merge branch 'current' into damian3031/on_table_exists-option-in-incr…
Browse files Browse the repository at this point in the history
…emental-models
  • Loading branch information
dataders authored May 17, 2024
2 parents b3c5fb4 + 2eeee9e commit 281ef37
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions website/docs/docs/build/metrics-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The keys for metrics definitions are:

| Parameter | Description | Type |
| --------- | ----------- | ---- |
| `name` | Provide the reference name for the metric. This name must be unique amongst all metrics. | Required |
| `name` | Provide the reference name for the metric. This name must be a unique metric name and can consist of lowercase letters, numbers, and underscores. | Required |
| `description` | Describe your metric. | Optional |
| `type` | Define the type of metric, which can be `conversion`, `cumulative`, `derived`, `ratio`, or `simple`. | Required |
| `type_params` | Additional parameters used to configure metrics. `type_params` are different for each metric type. | Required |
Expand Down Expand Up @@ -199,7 +199,7 @@ metrics:

[Simple metrics](/docs/build/simple) point directly to a measure. You may think of it as a function that takes only one measure as the input.

- `name`— Use this parameter to define the reference name of the metric. The name must be unique amongst metrics and can include lowercase letters, numbers, and underscores. You can use this name to call the metric from the dbt Semantic Layer API.
- `name` — Use this parameter to define the reference name of the metric. The name must be unique amongst metrics and can include lowercase letters, numbers, and underscores. You can use this name to call the metric from the dbt Semantic Layer API.

**Note:** If you've already defined the measure using the `create_metric: True` parameter, you don't need to create simple metrics. However, if you would like to include a constraint on top of the measure, you will need to create a simple type metric.

Expand Down
10 changes: 9 additions & 1 deletion website/docs/faqs/Troubleshooting/access-gdrive-credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you're seeing the below error when you try to query a dataset from a Google D
Access denied: BigQuery BigQuery: Permission denied while getting Drive credentials
```

Usually, this error indicates that you haven't granted the BigQuery service account access to the specific Google Drive document. If you're seeing this error, try giving the service account (client email seen [here](https://docs.getdbt.com/docs/dbt-cloud/cloud-configuring-dbt-cloud/connecting-your-database#connecting-to-bigquery)) you are using for your BigQuery connection in dbt Cloud, permission to your Google Drive or Google Sheet. You'll want to do this directly in your Google Document and click the 'share' button and enter the client email there.
Usually, this error indicates that you haven't granted the BigQuery service account access to the specific Google Drive document. If you're seeing this error, try giving the service account (Client email field seen [here](/docs/cloud/connect-data-platform/connect-bigquery)) you are using for your BigQuery connection in dbt Cloud, permission to your Google Drive or Google Sheet. You'll want to do this directly in your Google Document, click the **Share** button, and enter the client email.

If you are experiencing this error when using OAuth, and you have verified your access to the Google Sheet, you may need to grant permissions for gcloud to access Google Drive:

Expand All @@ -21,4 +21,12 @@ gcloud auth application-default login --disable-quota-project
```
For more info see the [gcloud auth application-default documentation](https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login)

If you've tried the earlier steps and are still experiencing this behavior, try using the following command to log into Google Cloud and enable access to Google Drive. It also updates the Application Default Credentials (ADC) file, which many Google Cloud libraries use to authenticate API calls.

```
gcloud auth login --enable-gdrive-access --update-adc
```

For more info, refer to [gcloud auth login documentation](https://cloud.google.com/sdk/gcloud/reference/auth/login#--enable-gdrive-access).

If you've tried the steps above and are still experiencing this behavior - reach out to the Support team at [email protected] and we'll be happy to help!
12 changes: 1 addition & 11 deletions website/docs/sql-reference/date-functions/sql-dateadd.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ slug: /sql-reference/dateadd
<title>What is the SQL DATEADD Function?</title>
</head>

If you’ve used the DATEADD SQL function any number of times, you’ve googled the syntax of the function all of those times except one, when I decided to hit the “are you feeling lucky” button and go for it.

In switching between SQL dialects (BigQuery, Postgres and Snowflake are my primaries), it's almost impossible to remember the argument order (or exact function name) of dateadd.
If you’ve ever used the DATEADD SQL function across dialects (such as BigQuery, Postgres and Snowflake), you’ve probably had to google the syntax of the function every time. It's almost impossible to remember the argument order (or exact function name) of dateadd.

This article will go over how the DATEADD function works, the nuances of using it across the major cloud warehouses, and how to standardize the syntax variances using dbt macro.

Expand Down Expand Up @@ -39,14 +37,6 @@ dateadd( {{ datepart }}, {{ interval }}, {{ from_date }} )

*Hour, minute and second are supported!*

### For example, the DATEADD function in Snowflake…

```
dateadd( {{ datepart }}, {{ interval }}, {{ from_date }} )
```

*Hour, minute and second are supported!*

### The DATEADD function in Databricks

```sql
Expand Down
3 changes: 2 additions & 1 deletion website/snippets/_manifest-versions.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

| dbt Core version | Manifest version |
|------------------|---------------------------------------------------------------|
| v1.8 | [v12](https://schemas.getdbt.com/dbt/manifest/v12/index.html) |
| v1.7 | [v11](https://schemas.getdbt.com/dbt/manifest/v11/index.html) |
| v1.6 | [v10](https://schemas.getdbt.com/dbt/manifest/v10/index.html) |
| v1.5 | [v9](https://schemas.getdbt.com/dbt/manifest/v9/index.html) |
| v1.4 | [v8](https://schemas.getdbt.com/dbt/manifest/v8/index.html) |
| v1.3 | [v7](https://schemas.getdbt.com/dbt/manifest/v7/index.html) |
| v1.2 | [v6](https://schemas.getdbt.com/dbt/manifest/v6/index.html) |
| v1.1 | [v5](https://schemas.getdbt.com/dbt/manifest/v5/index.html) |
| v1.0 | [v4](https://schemas.getdbt.com/dbt/manifest/v4/index.html) |
| v1.0 | [v4](https://schemas.getdbt.com/dbt/manifest/v4/index.html) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 281ef37

Please sign in to comment.