Patching data errors in Apple School Manager CSVs

When you import data from your SIS to Apple School Manager, it’s possible for the CSV files to include errors. When you use Claris Connect to upload CSV files with errors to Apple School Manager, the flow run may finish successfully, however, syncing to Apple School Manager will fail, and the SIS data will not be synced. Sometimes, these errors can be avoided by modifying the data causing the errors. To do this, you can use the Patch Apple School Manager CSV data action provided by the Apple School Manager connector.

Notes 

  • The Patch Apple School Manager CSV data action modifies the data after it is imported from your SIS. It doesn't directly modify the data in your SIS.

  • Using this action to patch data is a temporary solution. Data that is modified with this action should be properly fixed in your SIS before a subsequent flow run that syncs data to Apple School Manager; otherwise, you will continue to sync incomplete data.

Patch Apple School Manager CSV data

The Patch Apple School Manager CSV data action looks for validation errors caught by the Validate Apple School Manager ZIP file step. It modifies data in the Apple School Manager-formatted CSV files to temporarily fix errors so that the sync to Apple School Manager is more likely to succeed.

Validation error scenarios

  • The ID for an instructor (instructor_id) in the Classes table (classes.csv) doesn’t match the ID for a person (person_id) in the Staff table (staff.csv).

  • A record in the Rosters table (rosters.csv) has a class (class_id) that doesn’t match any class (class_id) in the Classes table (classes.csv).

Based on these scenarios, you can turn on one or more of the following patch options to address the errors:

Turn on To
Patch instructor errors in the Classes table Remove instructor_id’s from classes.csv if they don’t match any person_id in staff.csv
Patch Roster class record errors

Remove records in rosters.csv that have class_id’s that don’t match any class_id in classes.csv

Patch Roster student record errors Remove records in rosters.csv that have student_id's that don't match any person_id in students.csv

The Patch Apple School Manager CSV data action will scan the CSV data for one or more of these scenarios and modify the data accordingly. After data is modified with this action, a new ZIP file, which contains the modified CSVs, and a report listing the changes made are available in the History tab for this step. See “Downloadable files” below.

Downloadable files

Two files are generated by the Patch Apple School Manager CSV data action:

  • Modified CSV data (.zip) - Contains a new ZIP file with CSV data that has been modified.

    Note  For data security, the new ZIP file is only available for 72 hours.

  • Report (.txt) - Lists the changes made to your data. Changes to records are grouped by the table they're associated with; for example, classes removed from the Rosters table are grouped together.

To download these files:

  1. Go to the History tab of your flow.

  2. Click the flow run you want to view.

  3. In the "Patch CSV data" row, click View report.

  4. Do one of the following:

    • Click Modified CSV data (.zip) to download the new ZIP file with modified CSV data.

    • Click Report (.txt) to download the report.

Example report

In this example, the report was generated with the following options turned on:

  • Patch instructor errors in the Classes table

  • Patch Roster record errors

'Start patching CSV data...',
'[classes.csv] Start patching Classes...',
'[classes.csv] Finished patching Classes.',
'[rosters.csv] Start patching Rosters...',
'[rosters.csv] Line 2: Found field class_id [133] that is not in file: classes.csv',
'[rosters.csv] Removing record',
'[rosters.csv] Line 4: Found field class_id [11] that is not in file: classes.csv',
'[rosters.csv] Removing record',
'[rosters.csv] Line 6: Found field class_id [133] that is not in file: classes.csv',
'[rosters.csv] Removing record',
'[rosters.csv] Line 7: Found field class_id [133] that is not in file: classes.csv',
'[rosters.csv] Removing record',
'[rosters.csv] Line 8: Found field class_id [133] that is not in file: classes.csv',
'[rosters.csv] Removing record',
'[rosters.csv] Updated Rosters',
'[rosters.csv] Finished patching Rosters',
'Finished patching CSV data'

In this report, no records in classes.csv had instructor_id errors, so no records were modified. However, 5 records in rosters.csv had class IDs that didn’t match a class_id in classes.csv, so they were removed from rosters.csv.