Open edgarf opened 8 years ago
@regiscamimura - could you please check why there is not data shown on "Attendance" section of the EASOL Dashboard?
@edgarf I looked into that, and it's empty because that's how data is set in the database. I mean, it's not an error. Here what I found:
INNER JOIN edfi.StudentSchoolAssociation
ON StudentSchoolAssociation.StudentUSI = StudentSchoolAttendanceEvent.StudentUSI
AND StudentSchoolAssociation.SchoolId = StudentSchoolAttendanceEvent.SchoolId
AND StudentSchoolAssociation.SchoolYear = StudentSchoolAttendanceEvent.SchoolYear
Note that besides the needed relationship between the attendance event -> Student -> StudentSchoolAssociation, the school year must also match the record. It seems like the fact a student was related to a school in 2014 doesn't means it is still related in 2015... which makes sense, but it does not makes sense that this student has an attendance event for 2015 in a given school, but he is not related to that school in 2015. Not sure why the data is set up like that. Any ideas?
Anyway, if you look at the table for StudentSchoolAssociation, you'll see that we do have a lot of records relating Students to SchoolID = 3, but SchoolYear is NULL for all of them. If you run this query:
UPDATE [edfi].[StudentSchoolAssociation] SET SchoolYear = 2015 WHERE SchoolId = 3 AND SchoolYear IS NULL;
You should see records in the attendance section.
Well, what we have is missing or missmatching data, or should we change something in the code logic?
@regiscamimura thank you for the research! We will check it with other team members to see what shall we do here.
Analyze which data is missing (or invalid).