Skip to content

Commit

Permalink
Merge branch 'current' into pr-template-url-bitbucket
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Aug 9, 2023
2 parents bbe3fc5 + 6ade034 commit 1dcb401
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
12 changes: 6 additions & 6 deletions website/docs/docs/dbt-cloud-apis/sl-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,18 @@ To query metric values, here are the following parameters that are available:
| Parameter | Description | Example | Type |
| --------- | -----------| ------------ | -------------------- |
| `metrics` | The metric name as defined in your dbt metric configuration | `metrics=[revenue]` | Required |
| `group_by` | Dimension names or entities to group by. We require a reference to the entity of the dimension (other than for the primary time dimension), which is pre-appended to the front of the dimension name with a double underscore. | `group_by=[user__country, metric_time]` | Optional |
| `grain` | A parameter specific to any time dimension and changes the grain of the data from the default for the metric. | ```group_by=[`Dimension('metric_time').``` <br/> ```grain('week\|day\|month\|quarter\|year')]``` | Optional |
| `where` | A where clause that allows you to filter on dimensions and entities using parameters - comes with `TimeDimension`, `Dimension`, and `Entity` objects. Granularity is required with `TimeDimension` | `"{{ where="Dimension('customer__country') = 'US')"` | Optional |
| `metrics` | The metric name as defined in your dbt metric configuration | `metrics=['revenue']` | Required |
| `group_by` | Dimension names or entities to group by. We require a reference to the entity of the dimension (other than for the primary time dimension), which is pre-appended to the front of the dimension name with a double underscore. | `group_by=['user__country', 'metric_time']` | Optional |
| `grain` | A parameter specific to any time dimension and changes the grain of the data from the default for the metric. | `group_by=[Dimension('metric_time')` <br/> `grain('week\|day\|month\|quarter\|year')]` | Optional |
| `where` | A where clause that allows you to filter on dimensions and entities using parameters - comes with `TimeDimension`, `Dimension`, and `Entity` objects. Granularity is required with `TimeDimension` | `"{{ where=Dimension('customer__country') = 'US')"` | Optional |
| `limit` | Limit the data returned | `limit=10` | Optional |
|`order` | Order the data returned | `order_by=['-order_gross_profit']` (remove `-` for ascending order) | Optional |
| `explain` | If true, returns generated SQL for the data platform but does not execute | `explain=True` | Optional |
## Note on time dimensions and `metric_time`
You will notice that in the list of dimensions for all metrics, there is a dimension called `metric_time`'. `Metric_time` is a reserved keyword for the measure-specific aggregation time dimensions. For any time-series metric, the `metric_time` keyword should always be available for use in queries. This is a common dimension across *all* metrics in a semantic graph.
You will notice that in the list of dimensions for all metrics, there is a dimension called `metric_time`. `Metric_time` is a reserved keyword for the measure-specific aggregation time dimensions. For any time-series metric, the `metric_time` keyword should always be available for use in queries. This is a common dimension across *all* metrics in a semantic graph.
You can look at a single metric or hundreds of metrics, and if you group by `metric_time`, it will always give you the correct time series.
Expand All @@ -157,7 +157,7 @@ Note that `metric_time` should be available in addition to any other time dimens
## Examples
Use the following examples to help you get started with the JDBC API
Refer to the following examples to help you get started with the JDBC API.
### Fetch metadata for metrics
Expand Down
2 changes: 1 addition & 1 deletion website/docs/reference/resource-configs/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ seeds:

## Warehouse specific information
* BigQuery: `project` and `database` are interchangeable
* Redshift: Cross-database queries are not possible in Redshift. As such, dbt will return a Database Error if you use 'Database A' for a seed file and try to `{{ ref() }}` that seed file (or its database object) in a model using 'Database B'. This error would only be found at runtime.

6 changes: 6 additions & 0 deletions website/docs/reference/resource-configs/postgres-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ id: "postgres-configs"

In dbt-postgres, the following incremental materialization strategies are supported:

<VersionBlock lastVersion="1.5">
- `append` (default)
- `delete+insert`
</VersionBlock>
<VersionBlock firstVersion="1.6">
- `append` (default)
- `merge`
- `delete+insert`
</VersionBlock>


## Performance Optimizations
Expand Down
6 changes: 6 additions & 0 deletions website/docs/reference/resource-configs/redshift-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ To-do:

In dbt-redshift, the following incremental materialization strategies are supported:

<VersionBlock lastVersion="1.5">
- `append` (default)
- `delete+insert`
</VersionBlock>
<VersionBlock firstVersion="1.6">
- `append` (default)
- `merge`
- `delete+insert`
</VersionBlock>

All of these strategies are inheirited via from dbt-postgres.

Expand Down

0 comments on commit 1dcb401

Please sign in to comment.