diff --git a/assessments/KRAssessment/earthmover.yml b/assessments/KRAssessment/earthmover.yml index b9b99dc8..392db391 100644 --- a/assessments/KRAssessment/earthmover.yml +++ b/assessments/KRAssessment/earthmover.yml @@ -8,29 +8,30 @@ config: parameter_defaults: STUDENT_ID_NAME: 'edFi_studentUniqueID' # default to the column added by the apply_xwalk package of student ID xwalking feature edFi_studentUniqueID POSSIBLE_STUDENT_ID_COLUMNS: 'PS_StudentID,StudentSUNS' + DESCRIPTOR_NAMESPACE: uri://ed-fi.org sources: input: file: ${INPUT_FILE} header_rows: 1 assessments: - file: ${BUNDLE_DIR}/seeds/assessments.csv + file: ./seeds/assessments.csv header_rows: 1 objectiveAssessments: - file: ${BUNDLE_DIR}/seeds/objectiveAssessments.csv + file: ./seeds/objectiveAssessments.csv header_rows: 1 assessmentReportingMethodDescriptors: - file: ${BUNDLE_DIR}/seeds/assessmentReportingMethodDescriptors.csv + file: ./seeds/assessmentReportingMethodDescriptors.csv header_rows: 1 gradeLevelDescriptors: - file: ${BUNDLE_DIR}/seeds/gradeLevelDescriptors.csv + file: ./seeds/gradeLevelDescriptors.csv header_rows: 1 performanceLevelDescriptors: - file: ${BUNDLE_DIR}/seeds/performanceLevelDescriptors.csv + file: ./seeds/performanceLevelDescriptors.csv header_rows: 1 assessmentCategoryDescriptors: - file: ${BUNDLE_DIR}/seeds/assessmentCategoryDescriptors.csv + file: ./seeds/assessmentCategoryDescriptors.csv header_rows: 1 transformations: @@ -129,13 +130,18 @@ transformations: create_columns: grade_json: agg(grade_json,,) - prepare_assessments: + + + stage_assessments: source: $sources.assessments operations: - operation: add_columns columns: assessmentIdentifier: "KRA" + prepare_assessments: + source: $transformations.stage_assessments + operations: - operation: join sources: - $transformations.grade_level_descriptors @@ -155,6 +161,10 @@ transformations: join_type: inner left_key: assessmentIdentifier right_key: assessmentIdentifier + - operation: add_columns + columns: + descriptorNamespace: ${DESCRIPTOR_NAMESPACE} + prepare_objective_assessments: source: $sources.objectiveAssessments @@ -165,7 +175,6 @@ transformations: - operation: join sources: - $transformations.performance_levels - join_type: inner left_key: assessmentIdentifier right_key: assessmentIdentifier @@ -175,24 +184,34 @@ transformations: join_type: inner left_key: assessmentIdentifier right_key: assessmentIdentifier + - operation: add_columns + columns: + descriptorNamespace: ${DESCRIPTOR_NAMESPACE} prepare_student_assessments: - source: $sources.input + source: $transformations.input operations: - operation: duplicate_columns columns: ${STUDENT_ID_NAME}: studentUniqueId + - operation: rename_columns columns: SchoolCode: schoolId - - operation: add_columns columns: assessmentIdentifier: "KRA" administrationDate: "{%raw%}{{ DateTaken }}{%endraw%}" - whenAssessedGradeLevelDescriptor: "uri://ed.sc.gov/GradeLevelDescriptor#0" + descriptorNamespace: ${DESCRIPTOR_NAMESPACE} + - operation: join + sources: + - $transformations.stage_assessments + join_type: inner + left_key: assessmentIdentifier + right_key: assessmentIdentifier + - operation: add_columns columns: studentAssessmentIdentifier: "{% raw %}{{ md5(assessmentIdentifier ~ '-' ~ studentUniqueId ~ '-' ~ DateTaken) }}{% endraw %}" @@ -210,8 +229,10 @@ transformations: PerformanceLevel_PDScore: "{%raw%}{% if PDScore >= minimumScore and PDScore <= maximumScore %}{{ codeValue }}{% endif %}{%endraw%}" - operation: filter_rows query: "(PerformanceLevel_SFScore != 'Unknown' ) or (PerformanceLevel_LLScore != 'Unknown') or (PerformanceLevel_MAScore != 'Unknown') or (PerformanceLevel_PDScore != 'Unknown' )" - behavior: include + - operation: rename_columns + columns: + namespace_x: namespace - operation: group_by group_by_columns: - studentAssessmentIdentifier @@ -228,12 +249,13 @@ transformations: - MAScore - PDScore - schoolId + - descriptorNamespace create_columns: PerformanceLevel_SFScore: agg(PerformanceLevel_SFScore,) PerformanceLevel_LLScore: agg(PerformanceLevel_LLScore,) PerformanceLevel_MAScore: agg(PerformanceLevel_MAScore,) PerformanceLevel_PDScore: agg(PerformanceLevel_PDScore,) - + destinations: diff --git a/assessments/KRAssessment/templates/assessments.jsont b/assessments/KRAssessment/templates/assessments.jsont index 2a8fc520..9cb43aac 100644 --- a/assessments/KRAssessment/templates/assessments.jsont +++ b/assessments/KRAssessment/templates/assessments.jsont @@ -4,12 +4,12 @@ "assessmentFamily": "{{assessmentIdentifier}}", "namespace": "{{namespace}}", "assessedGradeLevels": [{{grade_json}}], - "assessmentCategoryDescriptor": "{{namespace}}/AssessmentCategoryDescriptor#{{assessmentCategoryDescriptor}}", - "academicSubjects": [ {"academicSubjectDescriptor":"uri://ed.sc.gov/AcademicSubjectDescriptor#{{academicSubjectDescriptor}}"}], + "assessmentCategoryDescriptor": "{{assessmentCategoryDescriptor}}", + "academicSubjects": [ {"academicSubjectDescriptor":"{{academicSubjectDescriptor}}"}], "scores": [ { "assessmentReportingMethodDescriptor": "{{namespace}}/AssessmentReportingMethodDescriptor#ScaleScore", - "resultDatatypeTypeDescriptor": "uri://ed-fi.org/ResultDatatypeTypeDescriptor#Integer", + "resultDatatypeTypeDescriptor": "uri://{{descriptorNamespace}}/ResultDatatypeTypeDescriptor#Integer", "minimumScore":"{{ minimumScore }}", "maximumScore":"{{ maximumScore }}" } diff --git a/assessments/KRAssessment/templates/objectiveAssessments.jsont b/assessments/KRAssessment/templates/objectiveAssessments.jsont index 773316ee..cd75b816 100644 --- a/assessments/KRAssessment/templates/objectiveAssessments.jsont +++ b/assessments/KRAssessment/templates/objectiveAssessments.jsont @@ -10,7 +10,7 @@ "scores": [ { "assessmentReportingMethodDescriptor": "{{namespace}}/KRA/AssessmentReportingMethodDescriptor#ScaleScore", - "resultDatatypeTypeDescriptor": "uri://ed-fi.org/ResultDatatypeTypeDescriptor#Integer", + "resultDatatypeTypeDescriptor": "{{descriptorNamespace}}/ResultDatatypeTypeDescriptor#Integer", "minimumScore":"{{ minimumScore | string }}", "maximumScore":"{{ maximumScore | string}}" } diff --git a/assessments/KRAssessment/templates/studentAssessmentEducationOrganizationAssociations.jsont b/assessments/KRAssessment/templates/studentAssessmentEducationOrganizationAssociations.jsont index 922beffa..5ff535e5 100644 --- a/assessments/KRAssessment/templates/studentAssessmentEducationOrganizationAssociations.jsont +++ b/assessments/KRAssessment/templates/studentAssessmentEducationOrganizationAssociations.jsont @@ -1,5 +1,5 @@ { - "educationOrganizationAssociationTypeDescriptor": "uri://ed-fi.org/EducationOrganizationAssociationTypeDescriptor#Administration", + "educationOrganizationAssociationTypeDescriptor": "{{descriptorNamespace}}/EducationOrganizationAssociationTypeDescriptor#Administration", "educationOrganizationReference": { "educationOrganizationId": {{ schoolId }} }, diff --git a/assessments/KRAssessment/templates/studentAssessments.jsont b/assessments/KRAssessment/templates/studentAssessments.jsont index ccc88595..031f270c 100644 --- a/assessments/KRAssessment/templates/studentAssessments.jsont +++ b/assessments/KRAssessment/templates/studentAssessments.jsont @@ -21,7 +21,7 @@ {% if OverallScore is not none and OverallScore | length %} { "assessmentReportingMethodDescriptor": "{{namespace}}/AssessmentReportingMethodDescriptor#ScaleScore", - "resultDatatypeTypeDescriptor": "uri://ed-fi.org/ResultDatatypeTypeDescriptor#Integer", + "resultDatatypeTypeDescriptor": "{{descriptorNamespace}}/ResultDatatypeTypeDescriptor#Integer", "result": "{{OverallScore}}" } {% endif %} @@ -53,7 +53,7 @@ "scoreResults": [ { "assessmentReportingMethodDescriptor": "{{namespace}}/AssessmentReportingMethodDescriptor#ScaleScore", - "resultDatatypeTypeDescriptor": "uri://ed-fi.org/ResultDatatypeTypeDescriptor#Integer", + "resultDatatypeTypeDescriptor": "{{descriptorNamespace}}/ResultDatatypeTypeDescriptor#Integer", "result": "{{ SFScore }}" } ], @@ -74,7 +74,7 @@ "scoreResults": [ { "assessmentReportingMethodDescriptor": "{{namespace}}/AssessmentReportingMethodDescriptor#ScaleScore", - "resultDatatypeTypeDescriptor": "uri://ed-fi.org/ResultDatatypeTypeDescriptor#Integer", + "resultDatatypeTypeDescriptor": "{{descriptorNamespace}}/ResultDatatypeTypeDescriptor#Integer", "result": "{{ LLScore }}" } ], @@ -95,7 +95,7 @@ "scoreResults": [ { "assessmentReportingMethodDescriptor": "{{namespace}}/AssessmentReportingMethodDescriptor#ScaleScore", - "resultDatatypeTypeDescriptor": "uri://ed-fi.org/ResultDatatypeTypeDescriptor#Integer", + "resultDatatypeTypeDescriptor": "{{descriptorNamespace}}/ResultDatatypeTypeDescriptor#Integer", "result": "{{ MAScore }}" } ], @@ -116,7 +116,7 @@ "scoreResults": [ { "assessmentReportingMethodDescriptor": "{{namespace}}/AssessmentReportingMethodDescriptor#ScaleScore", - "resultDatatypeTypeDescriptor": "uri://ed-fi.org/ResultDatatypeTypeDescriptor#Integer", + "resultDatatypeTypeDescriptor": "{{descriptorNamespace}}/ResultDatatypeTypeDescriptor#Integer", "result": "{{ PDScore }}" } ],