You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add use cases to readme
* Update create-table-of-contents.yml
* Don't run CI for markdown files
* Update README.md
* Auto update table of contents
* explain why we're ignoring main branch
Co-authored-by: joellabes <joellabes@users.noreply.github.com>
*[Dimensions on calendar tables](#dimensions-on-calendar-tables)
19
21
20
-
<!-- Added by: runner, at: Thu Feb 10 01:29:12 UTC 2022 -->
22
+
<!-- Added by: runner, at: Thu Feb 10 02:34:59 UTC 2022 -->
21
23
22
24
<!--te-->
23
25
@@ -28,6 +30,8 @@ This dbt package generates queries based on [metrics](https://docs.getdbt.com/do
28
30
To enable the dynamic referencing of models necessary for macro queries through the dbt Server, queries generated by this package do not participate in the DAG and `ref`'d nodes will not necessarily be built before they are accessed. Refer to the docs on [forcing dependencies](https://docs.getdbt.com/reference/dbt-jinja-functions/ref#forcing-dependencies) for more details.
29
31
30
32
# Usage
33
+
34
+
## Inside of dbt Models
31
35
Access metrics [like any other macro](https://docs.getdbt.com/docs/building-a-dbt-project/jinja-macros#using-a-macro-from-a-package):
32
36
```sql
33
37
select*
@@ -48,6 +52,11 @@ from {{ metrics.metric(
48
52
) }}
49
53
```
50
54
55
+
You may want to materialize the results as a fixed table for querying.
56
+
57
+
## Via the interactive dbt server (coming soon)
58
+
When the [dbt server](https://blog.getdbt.com/licensing-dbt/) is released later in 2022, you will be able to access these macros interactively, without needing to build each variant as a single dbt model. For more information, check out the [keynote presentation from Coalesce 2021](https://www.getdbt.com/coalesce-2021/keynote-the-metrics-system/)
59
+
51
60
# Secondary calculations
52
61
Secondary calculations are window functions which act on the primary metric. You can use them to compare a metric's value to an earlier period and calculate year-to-date sums or rolling averages.
0 commit comments