Skip to content

Commit df6b844

Browse files
author
Student
committed
add Add documentation for macros and marts
1 parent becd5c0 commit df6b844

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

macros/_macros__definitions.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 2
2+
3+
macros:
4+
- name: generate_schema_name
5+
description: '{{ doc("generate_schema_name_description") }}'

macros/_macros__docs.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% docs generate_schema_name_description %}
2+
This is a built-in dbt macro that changes the dataset name based on `target` and `+schema` config.
3+
4+
* If `target` == `prod`, then models will deploy to separate datasets based on `+schema` config set in `dbt_project.yml`. For example:
5+
* `staging`
6+
* `warehouse`
7+
* For any non-`prod` deployment, all models will deploy to the default dataset as indicated in `profiles.yml`. For example:
8+
* `dev_mkahan`
9+
* `dev_jdoe`
10+
11+
More information can be found at the dbt docs site [here](https://docs.getdbt.com/docs/building-a-dbt-project/building-models/using-custom-schemas#how-does-dbt-generate-a-models-schema-name)
12+
13+
{% enddocs %}

models/marts/_marts__docs.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% docs nba_games_detail_description %}
2+
A breakdown of metrics & other context related to individual `games`.
3+
4+
This model is presented on a `game`-level granularity and built with reusability in mind. The expectations is that the data will be aggregated in various ways but access to the underlying data points will still be desired. Example aggregations include by date, team, conference, coach, etc.
5+
6+
The metrics in this model include (but not limited to):
7+
* Total games played
8+
* Home/away scores
9+
* Point differentials
10+
* Home vs Away wins
11+
12+
Other game & team related detail inslude (but not limited to):
13+
* Team Names
14+
* Head Coaches
15+
* General Managers
16+
* Day Info (Date, Weekday, Month)
17+
* Game Status (Regulation, Overtime)
18+
{% enddocs %}

0 commit comments

Comments
 (0)