Delete Tool (Ed-Fi)

Tool Search: Delete Tool

The Delete Tool allows users to delete resource records from the Ed-Fi database for a specific resource ID, person, or set of people. This tool is useful for cleaning up duplicate records , removing erroneous data sent to Ed-Fi, and deleting orphan or erroneous records existing in the Ed-Fi ODS. Only resources active for the selected configuration display in the Delete tool.

Data removed from Ed-Fi via the Delete Tool is not removed from Campus. If a resync is performed or triggers occur for people who have had their records deleted from Ed-Fi, their data may resync to Ed-Fi unless they are marked to be excluded. 

Screenshot of Ed-Fi Delete tool.Ed-Fi Delete Tool

Read - View the Delete Tool.
Write - View the Delete Tool.
Add - View the Delete Tool.
Delete - Delete resource records.

For more information about Tool Rights and how they function, see this Tool Rights article.

Prerequisites

  • Ed-Fi functionality must be enabled via the Enable Ed-Fi System Preference.
  • In order to properly use Ed-Fi tools, proper values must be established within the Ed-Fi Config tool. This ensures Campus is communicating with Ed-Fi and successfully sending data to their servers.
  • Ed-Fi IDs should be assigned to users via the Demographics tab.

Deleting Resource Records for a Person(s)

This section walks you through the process of deleting resource records for a person(s).

Screenshot of deleting by Person ID.Delete by Person ID

To Delete Resource Records by Person ID:

  1. Mark the Delete by Person ID(s) radio button.

  2. Select the Configuration for which resource records will be deleted for the identified person/people. 

    Only resource records tied to this configuration will be deleted in the Ed-Fi system.

  3. Enter District Person IDs OR Select an AdHoc Filter to determine which users will have records for the selected resources deleted from the Ed-Fi database. 

    FieldDescription
    Enter District Person IDs
    Enter the PersonID of each person who will have their records for the selected resources deleted. 

    To look up a person's PersonID, navigate to Census > People > Demographics (see image below)

    Image of the PersonID field on the Demographics tool.Person ID


    Select AdHoc FilterSelect an existing Ad hoc filter to insert a list of specific District Person IDs. The Ad hoc can be either a Selection Editor or Query Wizard with Data Types of Students or Census/Staff.
  4. Select which Resource records will be deleted from the Ed-Fi database. If the resource selected has other resource dependencies, the checkboxes for these dependencies will be automatically marked.

    Deleting Resources With Dependencies: Please use caution while deleting resources with dependencies. If dependencies are selected during delete, the associated records will be deleted. Users would need to resync the resource(s) after this type of delete. As an example: When a user deletes Student Discipline Incident Associations using the Delete Tool, the associated Discipline Actions are also deleted when Discipline Actions is auto selected because of the dependency. The user would need to resync the Discipline Actions resource after this type of delete.


    Screenshot of selecting the resources inwhich data will be deleted.
    Select Resource(s)
  5. Select the Delete button. The delete request will go into the Event Queue for processing. Once processed, all records tied to the resources and people identified on the Delete Tool editor will be deleted from the Ed-Fi database.

Deleting Resource Records by Ed-Fi Resource ID(s)

The Delete by Ed-Fi Resource ID(s) option allows districts to delete specific resource data both in the Ed-Fi ODS and within the Campus Ed-Fi Identity Mapping tables. This functionality is useful for cleaning up erroneous data that exists only in the Ed-Fi ODS, only within Campus Ed-Fi Identity Mapping tables, or existing at both the Ed-FI ODS and within Campus Ed-Fi Identity Mapping tables. 

In order to effectively use this tool, users must refer to the Ed-Fi-generated Resource ID numbers provided to them. These Resource ID numbers are critical for properly identifying and deleting records in the ODS and within Campus. Resource IDs can be located using the Ed-Fi Identity Mapping report, Ed-Fi Data tool, or found directly from the ODS.

This section will walk you through the process of deleting resource records via an Ed-Fi Resource ID. 

Deleting records based on Resource ID does not account for resource dependencies. Because of this, there is a heightened chance of orphaning data. Proceed with caution.

Screenshot of dleting by Ed-Fi Resource ID.Delete by Ed-Fi Resource ID(s)

To Delete Resource Records by Ed-Fi Resource ID

  1. Mark the Delete by Ed-Fi Resource ID(s) radio button.

  2. Select the Configuration for which resource records will be deleted for the identified person/people. 
  3. Locate the Resource ID that will be used to delete records:
    - If a record is in Campus and not in the ODS: The Ed-Fi Identity Mapping report can be used to find the Resource ID.
    - If a record is in the ODS but not in Campus: The Ed-Fi Data tool can be used to find the Resource ID or the Resource ID can be retrieved directly from the ODS.
  4. For the record which should be deleted, enter the Resource ID into the box below the Delete by Ed-Fi Resource ID(s) radio button.

    You may enter more than one Resource ID as long as all Resource IDs reference the same resource. Attempting to delete records for multiple Resource IDs across different resources will result in an error.
    Screenshot of deleting by Ed-Fi Resource ID.Delete by Ed-Fi Resource ID(s)
  5. Identify the Resource Type of the record associated with the Resource ID entered in Step 4 and select the matching resource in the Delete Tool.
    Screenshot of selecting a resource on the Delete tool.Select Resource(s)

  6. Once the Resource ID has been entered and the proper resource checkbox has been marked, click the Delete button to initiate deletion of the record. 
  7. The record has now been successfully deleted at both the Ed-Fi ODS and within Campus Ed-Fi Identity Mapping tables. 

For more information about what occurs once a delete is initiated, see the What Happens When I Delete a Record? section.

What Happens When I Delete a Record?

When deletion of a record is initiated, the following occurs:

  • When the Delete by Person ID(s) option is selected, logic looks for all records in the Identity Mapping table associated with the delete options selected and triggers delete messages to the Campus Ed-Fi transformer to process the request which appears as the table name within the Event Queue. 
  • When the Delete by Ed-Fi Resource ID(s) option is selected, logic first looks to see if the record(s) exist within Campus in the Identity Mapping table and if it exists, it triggers a delete message to the Campus Ed-Fi transformer to process the request which appears as the table name within the Event Queue. 
    • If the record does not exist within Campus in the Ed-Fi Identity Mapping table, a delete message is sent to the Campus Ed-Fi transformer to delete the record from the Ed-Fi ODS. 
  • After the delete message has been sent to the Ed-Fi ODS and the record is successfully deleted from the Ed-Fi ODS, Ed-Fi will send back a message stating "204: the resource was successfully deleted". Campus then deletes the record from the Campus Ed-Fi Identity Mapping table after we have confirmed the record successfully deleted in the Ed-Fi ODS.

Troubleshooting Delete Tool Errors

If a delete error message occurs, consider the following:

  • If the delete message is "Error code returned from Ed-Fi. 404: Failed to delete (insert resource Name) resource. [message:Resource to delete was not found.]', the record is deleted from the Identity Mapping table and no error is listed in the error log.
  • If the delete message is "Error code returned from Ed-Fi. 409: Failed to delete (insert resource Name) Resource. [message:The resource (or a subordinate entity of the resource) cannot be deleted because it is a dependency of the '(insert resource Name)' entity.]', the record is not deleted from the Identity Mapping table and a message appears in the error log.
  • If the resource ID entered does not appear in the Identity Mapping table for the resource selected, a Get on the ID is performed and a Delete by ID is performed, if found.
  • If the resource ID entered appears in the Identity Mapping table but not for the resource or year selected, the following error is presented: 
    • "The Ed-Fi Resource ID xxxxxx does not match the Resource selected to be deleted, but a match was found for this ID associated with the (insert resource Name) Resource.  To delete this Ed-Fi Resource ID, please select the (insert resource name) Resource in the Delete Tool to try again. If the user selected the wrong scope year, the user will get an error The Ed-Fi Resource ID xxxxxx does not match the End Year selected to be deleted, but a match was found for this ID associated with the XX-XX School Year. To delete this Ed-Fi Resource ID, please select the correct School Year in the Delete Tool to try again."
  • If no records are found for the PersonID or the Ed-Fi Resource ID entered, an error will appear stating: "No records were found for PersonID:  (PersonID)/Ed-Fi Resource ID: (Resource ID)"
  • If any other errors occur when deleting, records are not deleted from the Identity Mapping table and are shown in the error log (i.e., 500: An unhandled error occurred on the server).