-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restrict district, school ownership by tenant (#62)
* restrict district, school ownership by tenant * Update CHANGELOG.md
- Loading branch information
1 parent
f0e3f60
commit 2e6153b
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- in multi-tenant systems, it is possible for each tenant to individually | ||
-- define all the districts/schools in a state. We want to avoid having | ||
-- each tenant individually define each district and school, and only | ||
-- keep the definition from the tenant that actually has ownership | ||
-- since the relationship between tenant and district is not codified anywhere, | ||
-- we observe it from student enrollments. | ||
select distinct ssa.tenant_code, lea_id | ||
from {{ ref('stg_ef3__student_school_associations') }} ssa | ||
join {{ ref('stg_ef3__schools') }} sch | ||
on ssa.k_school = sch.k_school |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters