Skip to content

Commit a7d84fd

Browse files
Reporting Views Implementation (#261)
2 parents e2816b6 + d79129b commit a7d84fd

File tree

5 files changed

+40
-22
lines changed

5 files changed

+40
-22
lines changed

dbt/dbt_project.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,21 @@ models:
7575
+materialized: table
7676

7777
reporting_views:
78-
tags:
79-
- "reporting"
78+
+tags: ['exclude_from_ci','reporting']
8079
+materialized: view
80+
+schema: reporting
8181

8282
staging:
8383
tags:
8484
- "staging"
8585
+materialized: view
8686

87+
amplitude:
88+
base:
89+
tags:
90+
- "base"
91+
materialized: ephemeral
92+
8793
external_datasets:
8894
base:
8995
+docs:
@@ -107,36 +113,24 @@ models:
107113
tags:
108114
- "contains_pii"
109115

110-
pegasus_pii:
111-
tags:
112-
- "contains_pii"
116+
pegasus:
113117
base:
114118
tags:
115119
- "base"
116120
+materialized: ephemeral
117121
+docs:
118122
show: false
119-
120-
pegasus:
123+
124+
pegasus_pii:
125+
tags:
126+
- "contains_pii"
121127
base:
122128
tags:
123129
- "base"
124130
+materialized: ephemeral
125131
+docs:
126132
show: false
127133

128-
amplitude:
129-
base:
130-
tags:
131-
- "base"
132-
materialized: ephemeral
133-
134-
external_datasets:
135-
base:
136-
tags:
137-
- "base"
138-
+materialized: view
139-
140134
seeds:
141135
+docs:
142136
show: false

dbt/macros/generate_schema_name.sql

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% macro generate_schema_name(custom_schema_name, node) -%}
2+
3+
{%- set default_schema = target.schema -%}
4+
{%- if custom_schema_name is none -%}
5+
6+
{{ default_schema }}
7+
8+
{%- else -%}
9+
10+
{{ custom_schema_name | trim }}
11+
12+
{%- endif -%}
13+
14+
{%- endmacro %}

dbt/models/reporting_views/access_report_participation.sql renamed to dbt/models/reporting_views/Access_Report/access_report_participation.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ with participation as (
44
)
55

66
select *
7-
from participation
7+
from participation
8+
9+
--test
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
select school_year, count(*) as num_rows
2+
from {{ ref('dim_user_levels')}}
3+
where school_year < '2024-25'
4+
group by school_year

dbt/models/reporting_views/_reporting_views.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ models:
5757
data_tests:
5858
- not_null
5959
config:
60-
tags: ['released']
60+
tags: ['released','reporting']
6161

6262
## Yearly participating students
6363
- name: yearly_participating_students
@@ -101,4 +101,8 @@ models:
101101
data_tests:
102102
- not_null
103103
config:
104-
tags: ['released']
104+
tags: ['released']
105+
106+
107+
- name: testing
108+

0 commit comments

Comments
 (0)