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
Copy file name to clipboardExpand all lines: README.md
+70-1Lines changed: 70 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,75 @@ OneRoster CSV standard in the EDU framework
26
26
database. The tables are _not_ specified with case-sensitivity, but files
27
27
created from them should be.
28
28
29
+
## Unique Keys
30
+
OneRoster uses the term `SourcedId` to refer to the unique key of all files in the OneRoster standard. This implementation uses the following methodology and principles:
31
+
- All unique keys are the MD5 hash of a concatenation of Natural key values, separated by hyphens (`-`).
32
+
- For clarity/transparency, the literal string value that is hashed is included in the file as an extension column called `metadata.edu.natural_key`
33
+
- By default, all natural keys are prefixed with `tenant_code`, which is a human-readable string identifying a district. This can be overridden to be a constant string if desired using the variable `oneroster:id_prefix`
34
+
- Any natural key component that is non-integer is cast to lower-case for consistency
35
+
36
+
The natural keys for each resource are defined in the macro [gen_sourced_id](macros/gen_sourced_id.sql), but are written out below for clarity.
37
+
38
+
### Org
39
+
- tenant_code (or constant string, if configured)
40
+
- ed_org_id (`sea_id`, `lea_id`, or `school_id`, for the respective org-types)
41
+
42
+
### Users
43
+
- tenant_code (or constant string, if configured)
44
+
- The literal string `STU`, `STA`, or `PAR`, for students, staff, or parents
45
+
-`student_unique_id`, `staff_unique_id`, or `parent_unique_id`, respectively
46
+
- Note that this is the unique person identifier configured in Ed-Fi, and exactly which type of ID this is can vary across implementations.
47
+
48
+
### Sessions
49
+
For terms/semesters/etc, this is a school-specific session definition, taken
50
+
from Ed-Fi's definition of Sessions.
51
+
- tenant_code (or constant string, if configured)
52
+
- school_id
53
+
- session_name
54
+
55
+
For school years, each district has its own definition:
56
+
- tenant_code (or constant string, if configured)
57
+
- lea_id
58
+
- school_year (4 digit number representing the Spring year, e.g. for 2023-2024, `2024`)
59
+
60
+
### Courses
61
+
- tenant_code (or constant string, if configured)
62
+
- lea_id
63
+
- course_code
64
+
65
+
### Classes
66
+
- tenant_code (or constant string, if configured)
67
+
- school_id
68
+
- lower(section_id)
69
+
- lower(session_name)
70
+
71
+
Section ID and Session Name are cast to lower case to ensure consistency.
72
+
Session is included in the Class definition to align with how Ed-Fi thinks about
73
+
Sections, as well as because Ed-Fi Sessions are not date-exclusive and using dates
74
+
alone may not uniquely identify the session in which a Section is offered.
75
+
76
+
### Enrollments
77
+
Student Enrollments are a `student_unique_id`, the `local_course_code` from Ed-Fi's `CourseOffering`, the unique key of a Class, plus the `begin_date`. Note that students may enter and exit the same Class multiple times,
78
+
requiring the presence of `begin_date` in the enrollment record.
79
+
- tenant_code (or constant string, if configured)
80
+
- student_unique_id
81
+
- lower(local_course_code)
82
+
- school_id
83
+
- lower(section_id)
84
+
- lower(session_name)
85
+
- begin_date
86
+
87
+
Staff enrollments are the same, but substituting staff_unique_id
88
+
- tenant_code (or constant string, if configured)
89
+
- staff_unique_id
90
+
- lower(local_course_code)
91
+
- school_id
92
+
- lower(section_id)
93
+
- lower(session_name)
94
+
- begin_date
95
+
96
+
97
+
29
98
## Required Seed Files
30
99
Templates for required seed files are located in the [seed_templates](seed_templates/)
31
100
@@ -65,6 +134,6 @@ OneRoster is an extensible standard. Extensions in this package begin with `meta
65
134
66
135
`metadata.edu.natural_key`: All sourcedIds in this implementation are an MD5 hash of an underlying natural key. The definitions of the columns included in that key are in the [gen_sourced_id macro](macros/gen_sourced_id.sql). The unhashed string is included for clarity in this extension.
67
136
68
-
`metadata.edu.staffClassification`: The Ed-Fi Staff Classification field, for more
137
+
`metadata.edu.staff_classification`: The Ed-Fi Staff Classification field, for more
69
138
detailed role information. Since Ed-Fi permits multiple staffClassifications,
70
139
but OneRoster 1.1 does not, we have to choose one.
0 commit comments