Skip to content

Commit

Permalink
Merge branch 'current' into mwong-readme-edit
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Nov 21, 2022
2 parents 26573e6 + e26cca0 commit 25be009
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 40 deletions.
22 changes: 11 additions & 11 deletions website/docs/docs/build/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ metrics:
expression: user_id

timestamp: signup_date
time_grains: [day, week, month, quarter, year]
time_grains: [day, week, month, quarter, year, all_time]

dimensions:
- plan
Expand Down Expand Up @@ -123,7 +123,7 @@ metrics:
sql: user_id

timestamp: signup_date
time_grains: [day, week, month, quarter, year]
time_grains: [day, week, month, quarter, year, all_time]

dimensions:
- plan
Expand Down Expand Up @@ -165,14 +165,14 @@ Metrics can have many declared **properties**, which define aspects of your metr
|-------------|-------------------------------------------------------------|---------------------------------|-----------|
| name | A unique identifier for the metric | new_customers | yes |
| model | The dbt model that powers this metric | dim_customers | yes (no for `derived` metrics)|
| label | A short for name / label for the metric | New Customers | no |
| label | A short for name / label for the metric | New Customers | yes |
| description | Long form, human-readable description for the metric | The number of customers who.... | no |
| calculation_method | The method of calculation (aggregation or derived) that is applied to the expression | count_distinct | yes |
| expression | The expression to aggregate/calculate over | user_id, cast(user_id as int) | yes |
| timestamp | The time-based component of the metric | signup_date | yes |
| time_grains | One or more "grains" at which the metric can be evaluated. For more information, see the "Custom Calendar" section. | [day, week, month, quarter, year] | yes |
| dimensions | A list of dimensions to group or filter the metric by | [plan, country] | no |
| window | A dictionary for aggregating over a window of time. Used for rolling metrics such as 14 day rolling average. Acceptable periods are: [`day`,`week`,`month`, `year`] | {count: 14, period: day} | no |
| window | A dictionary for aggregating over a window of time. Used for rolling metrics such as 14 day rolling average. Acceptable periods are: [`day`,`week`,`month`, `year`, `all_time`] | {count: 14, period: day} | no |
| filters | A list of filters to apply before calculating the metric | See below | no |
| config | [Optional configurations](https://github.com/dbt-labs/dbt_metrics#accepted-metric-configurations) for calculating this metric | {treat_null_values_as_zero: true} | no |
| meta | Arbitrary key/value store | {team: Finance} | no |
Expand All @@ -185,12 +185,12 @@ Metrics can have many declared **properties**, which define aspects of your metr
|-------------|-------------------------------------------------------------|---------------------------------|-----------|
| name | A unique identifier for the metric | new_customers | yes |
| model | The dbt model that powers this metric | dim_customers | yes (no for `derived` metrics)|
| label | A short for name / label for the metric | New Customers | no |
| label | A short for name / label for the metric | New Customers |yes |
| description | Long form, human-readable description for the metric | The number of customers who.... | no |
| type | The method of calculation (aggregation or derived) that is applied to the expression | count_distinct | yes |
| sql | The expression to aggregate/calculate over | user_id, cast(user_id as int) | yes |
| timestamp | The time-based component of the metric | signup_date | yes |
| time_grains | One or more "grains" at which the metric can be evaluated | [day, week, month, quarter, year] | yes |
| time_grains | One or more "grains" at which the metric can be evaluated | [day, week, month, quarter, year, all_time] | yes |
| dimensions | A list of dimensions to group or filter the metric by | [plan, country] | no |
| filters | A list of filters to apply before calculating the metric | See below | no |
| meta | Arbitrary key/value store | {team: Finance} | no |
Expand Down Expand Up @@ -252,7 +252,7 @@ metrics:
expression: "{{metric('total_revenue')}} / {{metric('count_of_customers')}}"
timestamp: order_date
time_grains: [day, week, month, quarter, year]
time_grains: [day, week, month, quarter, year, all_time]
dimensions:
- had_discount
- order_country
Expand Down Expand Up @@ -293,7 +293,7 @@ metrics:
sql: "{{metric('total_revenue')}} / {{metric('count_of_customers')}}"
timestamp: order_date
time_grains: [day, week, month, quarter, year]
time_grains: [day, week, month, quarter, year, all_time]
dimensions:
- had_discount
- order_country
Expand Down Expand Up @@ -399,7 +399,7 @@ You may find some pieces of functionality, like secondary calculations, complica
| Input | Example | Description | Required |
| ----------- | ----------- | ----------- | -----------|
| <VersionBlock firstVersion="1.2">metric_list</VersionBlock><VersionBlock lastVersion="1.1">metric_name</VersionBlock> | <VersionBlock firstVersion="1.2">`metric('some_metric)'`, <br />[`metric('some_metric)'`, <br />`metric('some_other_metric)'`]<br /></VersionBlock><VersionBlock lastVersion="1.1">`'metric_name'`<br /></VersionBlock> | <VersionBlock firstVersion="1.2">The metric(s) to be queried by the macro. If multiple metrics required, provide in list format.</VersionBlock><VersionBlock lastVersion="1.1">The name of the metric</VersionBlock> | Required |
| grain | `'day'`, `'week'`, <br />`'month'`, `'quarter'`, <br />`'year'`<br /> | The time grain that the metric will be aggregated to in the returned dataset | Required |
| grain | `'day'`, `'week'`, <br />`'month'`, `'quarter'`, <br />`'year'`, `'all_time'`<br /> | The time grain that the metric will be aggregated to in the returned dataset | Required |
| dimensions | [`'plan'`,<br /> `'country'`] | The dimensions you want the metric to be aggregated by in the returned dataset | Optional |
| secondary_calculations | [`metrics.period_over_period( comparison_strategy="ratio", interval=1, alias="pop_1wk")`] | Performs the specified secondary calculation on the metric results. Examples include period over period calculations, rolling calcultions, and period to date calculations. | Optional |
| start_date | `'2022-01-01'` | Limits the date range of data used in the metric calculation by not querying data before this date | Optional |
Expand Down Expand Up @@ -427,7 +427,7 @@ metrics:
model: ref('fact_orders')
label: Total Discount ($)
timestamp: order_date
time_grains: [day, week, month, quarter, year]
time_grains: [day, week, month, quarter, year, all_time]
calculation_method: average
expression: discount_total
dimensions:
Expand Down Expand Up @@ -467,7 +467,7 @@ metrics:
model: ref('fact_orders')
label: Total Discount ($)
timestamp: order_date
time_grains: [day, week, month, quarter, year]
time_grains: [day, week, month, quarter, year, all_time]
type: average
sql: discount_total
dimensions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ and ensure that the API is enabled.

To complete setup, follow the steps below in the dbt Cloud application.

### Enable GSuite Native Auth (beta)

- For users accessing dbt Cloud at cloud.getdbt.com, contact your account manager to
gain access to the GSuite Native auth configuration UI
- For users accessing dbt Cloud deployed in a VPC, enable the `native_gsuite`
feature flag in the dbt Cloud admin backend.

### Supply your OAuth Client ID and Client Secret

1. Navigate to the **Enterprise &gt; Single Sign On** page under Account
Expand Down
25 changes: 11 additions & 14 deletions website/docs/docs/get-started/dbt-cloud-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,17 @@ With the Cloud IDE, you can:
The dbt Cloud IDE comes with features, including better performance and exciting enhancements, making it easier for you to develop, build, compile, run and test data models. Check out the some of the features below to learn more:


| Feature | Info | Available in the IDE |
|---|---|:---:|
| **File state indicators** | Ability to see when changes or actions have been made to the file. The indicators **M, U,** and **** appear to the right of your file or folder name and indicate the actions performed: <br /> <br /> - Unsaved **(•)** &mdash; The IDE detects unsaved changes to your file/folder<br /> - Modification **(M)** &mdash; The IDE detects a modification of existing files/folders<br /> - Untracked **(U)** &mdash; The IDE detects changes made to new files or renamed files ||
| **Build, test, and run code** | Build, test, and run your project with a button click or by using the Cloud IDE command bar. ||
| **Drag and drop** | Drag and drop files located in the file explorer, and use the file breadcrumb on the top of the IDE for quick, linear navigation. Access adjacent files in the same file by right clicking on the breadcrumb file. ||
| **Organize tabs** | You can move your tabs around to reorganize your work in the IDE. You can also right click on a tab to view and select a list of actions to take. ||
| **Multiple selections** | You can make multiple selections for small and simultaneous edits. The below commands are a common way to add more cursors and allow you to insert cursors below or above with ease.<br /><br /> - Option-Command-Down arrow<br /> - Option-Command-Up arrow<br /> - Press Option and click on an area ||
| **Formatting** | Format your files with a click of a button, powered by [sqlfmt](http://sqlfmt.com/). | _Coming soon &mdash; November 2022_ |
| **Git diff view** | Ability to see what has been changed in a file before you make a pull request. | _Coming soon &mdash; November 2022_ |
| **dbt autocomplete** | There are four new types of autocomplete features to help you develop faster:<br /> - Use `ref` to autocomplete your model names<br /> - Use `source` to autocomplete your source name + table name<br /> - Use `macro` to autocomplete your arguments<br /> - Use `env var` to autocomplete env var | _Coming soon &mdash; November 2022_ |
| **Dark mode** | Use dark mode in the Cloud IDE for a great viewing experience in low-light environments. | _Coming soon &mdash; November 2022_ |

**Note**: Cloud IDE beta users may have these features made available earlier.

| Feature | Info |
|---|---|
| **File state indicators** | Ability to see when changes or actions have been made to the file. The indicators **M, U,** and **** appear to the right of your file or folder name and indicate the actions performed: <br /> <br /> - Unsaved **(•)** &mdash; The IDE detects unsaved changes to your file/folder<br /> - Modification **(M)** &mdash; The IDE detects a modification of existing files/folders<br /> - Untracked **(U)** &mdash; The IDE detects changes made to new files or renamed files
| **Build, test, and run code** | Build, test, and run your project with a button click or by using the Cloud IDE command bar.
| **Drag and drop** | Drag and drop files located in the file explorer, and use the file breadcrumb on the top of the IDE for quick, linear navigation. Access adjacent files in the same file by right clicking on the breadcrumb file.
| **Organize tabs** | You can move your tabs around to reorganize your work in the IDE. You can also right click on a tab to view and select a list of actions to take.
| **Multiple selections** | You can make multiple selections for small and simultaneous edits. The below commands are a common way to add more cursors and allow you to insert cursors below or above with ease.<br /><br /> - Option-Command-Down arrow<br /> - Option-Command-Up arrow<br /> - Press Option and click on an area
| **Formatting** | Format your files with a click of a button, powered by [sqlfmt](http://sqlfmt.com/).
| **Git diff view** | Ability to see what has been changed in a file before you make a pull request.
| **dbt autocomplete** | There are four new types of autocomplete features to help you develop faster:<br /> - Use `ref` to autocomplete your model names<br /> - Use `source` to autocomplete your source name + table name<br /> - Use `macro` to autocomplete your arguments<br /> - Use `env var` to autocomplete env var
| **Dark mode** | Use dark mode in the Cloud IDE for a great viewing experience in low-light environments.


## Related docs
Expand Down
2 changes: 1 addition & 1 deletion website/docs/reference/node-selection/yaml-selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ selectors:
## Definitions
Each `definition` is comprised of one or more arguments, which can be one of the following:
* **CLI-style:** strings, representing CLI-style) arguments
* **CLI-style:** strings, representing CLI-style arguments
* **Key-value:** pairs in the form `method: value`
* **Full YAML:** fully specified dictionaries with items for `method`, `value`, operator-equivalent keywords, and support for `exclude`

Expand Down
3 changes: 3 additions & 0 deletions website/docs/reference/resource-configs/column_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ seeds:

## Recommendation
Use this configuration only when required, i.e. when the type inference is not working as expected. Otherwise you can omit this configuration.

## Troubleshooting
Note: The `column_types` configuration is case-sensitive, regardless of quoting configuration. If you specify a column as `Country_Name` in your Seed, you should reference it as `Country_Name`, and not `country_name`.
2 changes: 1 addition & 1 deletion website/docs/reference/resource-properties/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ models:
columns:
- name: order_id
tests:
- unique
- unique:
config:
where: "order_id > 21"
```
Expand Down
Loading

0 comments on commit 25be009

Please sign in to comment.