Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this primer on data quality, you will walk through the process of checking check your data for errors via provided stored procedures. In the Introduction to API - Quick Start you were guided to shown how to explore the API through the use of Postman.   The first collection, SEA Starter Kit, that was run not only exercised the API by executing GET/POST requests but also introduced a couple of several data anomalies for use in this validation guide. 

NOTE: In the API guide you were instructed to import the Postman environment and collection.   There is a second collection called , "SEA Modernization Starter Kit Rectification" that is , required for this Validation exercise, so if . If you imported it as well as you the collection and worked through the Introduction to API guide, then you are set. If you did not, please import it using Postman as you did the others , but do not run that collection yet.

Image RemovedImage Added


Now it's time to run our validation process. Using Connect to your server using SQL Server Management Studio (SSMS) connect to your server and in the , then use Object Explorer to navigate to your Ed-Fi ODS.   Expand the "Programmability" folder and then "Stored Procedures."   You will find two the included stored procedures procedure that will perform some validation checks on your data. 

Image RemovedImage Added


Execute each of these the stored procedures by right-clicking on one of them and selecting "Execute Stored Procedure."

Image Removed

You will be Image Added


Upon being prompted to provide values for the parameters, so proceed to add the values "all" and "20222023" for @StateOrganizationId and @Datayear respectively @Datayear respectively as shown below and click "Ok" to execute the procedure.

Image Removed

As each stored procedure executes, you will be able to monitor the results in your SSMS window. The following example shows result of executing "dbo.ValidationError_705" below. You'll notice that the validation procedure found one student record with over 100% FullTimeEquivalency, triggering inclusion in the validation report. 

Image Removed

Image Added

Image Added

Once you've run both "dbovalidation.ValidationError_705" and "dbo.ValidationError_743" you can LoadValidationErrors" procedure, navigate to the "Tables" folder in the Object Explorer and expand it to view the database tables. Locate "dbovalidation.DistrictErrorStagingDistrictErrorLog". " This table is where validation errors created by the above stored procedures procedure are stored. 

Image RemovedImage Added


You can now write a simple query to view the records on the table, or simply right-click and select "Select Top 1000 Rows" if you have fewer errors on the table and have no need to filter the results. 

Image RemovedImage Added


The result of the query for our example shows all the errors both stored procedures found and stored to the "dbovalidation.DistrictErrorStagingDistrictErrorLog" table.Image Removed You'll notice the validation procedure found one student record with over 100% FullTimeEquivalency and another record with no race reported for the student. 

Image Added


Now that we've worked through running validations and examining the errors, let's use another Postman collection to resolve the errors.   Open up Postman as an Administrator if it's not already open.   Navigate to the Collections tab on the left side of the application screen and select it.   You'll see the collections you've imported, including the "SEA Modernization Starter Kit Rectification" collection we covered in the opening section of this guide.   Locate the collection and select it, then click on the "Run" button.

Image RemovedImage Added


This will pull up the Runner window in Postman. Just like when you ran the initial collection, you will see all of the GET/POST requests selected. Click on "Run SEA Modernization Starter Kit Rectification" button as shown below. 

Image RemovedImage Added


A successful run will show all "Pass" values and status codes of 200 or 201. 

Image RemovedImage Added


After the Rectification collection has run, return to SSMS and rerun both Validation stored procedures.  validation stored procedure.

Image Added


View the results in "validation.DistrictErrorLog" table. Your output should now show no errors, as the Rectification collection has resolved the data errors.

Image Removed

NOTE: Currently, the stored procedures do not delete records from the "dbo.DistrictErrorStaging" table once errors have been resolved. You should choose to delete the table records and rerun the validation procedures to get current results in the table, or rely solely on the output of the procedures as the source of truth for current error status.  Image Added


Panel
titleBGColor#ffffff
borderStylenone

Reminder

States validate the data according to the state business rules and log the any errors. Errors Typically, errors are reported back to the LEA via a state error portal. The LEA then fixes the errors, and the data is re-transmitted to the API. The data quality validation scripts provided in the quick start are as examples.   This Quick Start contains sample validation scripts.