-
Notifications
You must be signed in to change notification settings - Fork 7
Feature/sedm student iep disabilities #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c1fa8da
4a59a64
3e274cd
fac20f9
ff439dc
d5fd88b
430f522
69e57aa
1dc4041
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't see this resource in the ed-fi handbook or api docs, is it not part of the 6.1 release? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| with disabilities as ( | ||
| {{ source_edfi3('student_iep_disability_collections')}} | ||
| ), | ||
| renamed as ( | ||
| select | ||
| tenant_code, | ||
| api_year, | ||
| pull_timestamp, | ||
| last_modified_timestamp, | ||
| file_row_number, | ||
| filename, | ||
| is_deleted, | ||
| v:id::string as record_guid, | ||
| ods_version, | ||
| data_model_version, | ||
| v:studentIEPReference:educationOrganizationId::int as ed_org_id, | ||
| v:studentIEPReference:iepFinalizedDate::date as iep_finalized_date, | ||
| v:studentIEPReference:studentIEPAssociationID::string as student_iep_association_id, | ||
| v:studentIEPReference:studentUniqueId::string as student_unique_id, | ||
| -- references | ||
| v:studentIEPReference as student_iep_reference, | ||
| -- lists | ||
| v:disabilities as v_disabilities, | ||
|
|
||
| -- edfi extensions | ||
| v:_ext as v_ext | ||
| from disabilities | ||
| ) | ||
| select * from renamed |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| with base as ( | ||
| select * from {{ ref('base_sedm__student_iep_disability_collections') }} | ||
| ), | ||
| keyed as ( | ||
| select | ||
| {{ dbt_utils.generate_surrogate_key( | ||
| [ | ||
| 'tenant_code', | ||
| 'api_year', | ||
| 'ed_org_id', | ||
| 'iep_finalized_date', | ||
| 'lower(student_iep_association_id)', | ||
| 'lower(student_unique_id)' | ||
| ] | ||
| ) }} as k_student_iep, | ||
| api_year as school_year, | ||
| base.*, | ||
| {{ extract_extension(model_name=this.name, flatten=True) }} | ||
| from base | ||
| ), | ||
| deduped as ( | ||
| {{ | ||
| dbt_utils.deduplicate( | ||
| relation='keyed', | ||
| partition_by='k_student_iep, ed_org_id', | ||
| order_by='last_modified_timestamp desc, pull_timestamp desc' | ||
| ) | ||
| }} | ||
| ), | ||
| flattened as ( | ||
| select | ||
| tenant_code, | ||
| school_year, | ||
| k_student_iep, | ||
| ed_org_id, | ||
| student_iep_association_id, | ||
| {{ extract_descriptor('value:disabilityDescriptor::string') }} as disability_descriptor, | ||
| {{ extract_descriptor('value:disabilityDeterminationSourceTypeDescriptor::string') }} as disability_determination_source_type_descriptor, | ||
| {{ extract_descriptor('value:disabilityDiagnosis::string') }} as disability_diagnosis, | ||
| {{ extract_descriptor('value:orderOfDisability::int') }} as order_of_disability | ||
| from deduped | ||
| {{ json_flatten('v_disabilities') }} | ||
| where not is_deleted | ||
| ) | ||
| select * from flattened |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,9 +8,9 @@ keyed as ( | |
| [ | ||
| 'tenant_code', | ||
| 'api_year', | ||
| 'lower(student_iep_association_id)', | ||
| 'ed_org_id', | ||
| 'iep_finalized_date', | ||
| 'lower(student_iep_association_id)', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for this catch!
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the edfi handbook and api docs seem to call this StudentIEPIdentifier -- did that change? |
||
| 'lower(student_unique_id)' | ||
| ] | ||
| ) }} as k_student_iep, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on API docs, I think we need
ideaEventTypeDescriptorinstead ofideaEvent