Skip to content

POC without support from the MCP Server #27

@stephenfuqua

Description

@stephenfuqua

The file students.csv contains data that need to be loaded into the Ed-Fi ODS/API. This file must be loaded into two endpoints in the Ed-Fi ODS/API: students and studentSchoolAssociations. Example CSV file:

uniqueId,birthDate,firstName,lastName,middleName,title,preferredFirstName,preferredLastName,enrollmentDate,enrollmentGradeLevel,fullTime
604835,2016-09-29,Diana,Holt,Emily,Ms,,,2021-08-23,Ninth grade,1,
604836,2007-03-30,Allie,Combs,Allison,Ms,,,2021-08-23,Tenth grade,1,
604837,2012-12-19,Glenn,Gross,Max,Mr,,,2021-08-23,Eleventh grade,0,
604839,2011-04-26,Meredith,Lloyd,Felicia,Mrs,,,2021-08-23,Eleventh grade,1,
604838,2005-11-29,Brent,Hartman,,Mr,,,2021-08-23,Tenth grade,1,
604841,2010-12-15,Mathew,Ramirez,,Mr,,,2021-08-23,Twelfth grade,1,
604840,2015-12-21,Nora,Blevins,Patricia,Ms,,,2021-08-23,Ninth grade,1,
604842,2015-12-02,Frederick,Munoz,Peter,Mr,,,2021-08-23,Twelfth grade,1,
604843,2009-09-24,Byron,Wilkerson,Keith,Mr,Page,Jackson,2021-08-23,Ninth grade,0,
604844,2009-03-21,Willie,Raymond,Allan,Mr,Will,Ray,2021-08-23,Twelfth grade,1,

Note

These are fake records with realistic names

The following table maps the CSV columns to the students endpoint.

Source Column API Property
uniqueId studentUniqueId
birthDate birthDate
firstName lastSurName
middleName middleName
title personalTitlePrefix
preferredFirstName preferredFirstName
preferredLastName preferredLastSurname

And this table maps the CSV columns to the studentSchoolAssociations endpoint.

Source Column API Property
enrollmentDate entryDate
enrollmentGradeLevel entryGradeLevelDescriptor
fullTime fullTimeEquivalency

For the entryGradeLevelDescriptor, the data must be formatted like uri://ed-fi.org/GradeLevelDescriptor#{enrollmentGradeLevel}

Write a Python script that:

  1. Authenticates with the Ed-Fi ODS/API using credentials provided in a .env file
  2. Reads the CSV file
  3. For each line:
    1. First POST the student information to the Ed-Fi API
    2. Then POST the studentSchoolAssociation information to the Ed-Fi API.

I prefer to use poetry for Python dependency management.

Create the script in directory /poc/before.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions