Skip to content

jamessmckay/DataChecker

 
 

Repository files navigation

Ed-Fi ODS Data Checker

Description

A very simple data checker that will have a set of files defining SQL statements to do level 2 validations on the ODS database

Live Demo

http://datacheck.toolwise.net/

Setup

There are 2 ways of running the Data Checker. In development or production mode. The main difference is that Development will run from your Visual Studio in IIS Express. While Production we will deploy to a local IIS.

For both environments you will need to complete the following common prerequisites:

Prerequisites

NOTE VERY IMPORTANT: The user that you will use to configure the execution environment should be read only.

Download or Clone the code to your machine

Clone or download the code located in the github repository: https://github.com/Ed-Fi-Alliance/Ed-Fi-X-DataChecker/

We recommend that you download the code in the following path: c:\Projects\edfi\DataChecker

To download click on this link and save to the folder where you wish to download. https://github.com/Ed-Fi-Alliance/Ed-Fi-X-DataChecker/archive/master.zip

To clone open your favorite shell, navigate to the path above or folder where you wish to download and then type in the following command:

c:\projects\edfi> git clone https://github.com/Ed-Fi-Alliance/Ed-Fi-X-DataChecker.git

Building the Binaries

  1. Open the solution file: Once you have the code on your local machine, open Visual Studio and the open the solution file located at c:\projects\edfi\DataChecker\MSDF.DataChecker.sln

  1. Ensure the solution builds: Right click the “MSDF.DataChecker.WebApp” project and click rebuild. If you get any errors it's probably because you are missing one of the dependencies or prerequisites listed above.

Configuring the Application Settings

In a .net Core application there are 2 files called “appsettings.json” and "appsettings.Production.json". This is where you need to ensure to configure the application’s settings. In this case we only need to update your database connection string. Data Checker supports both MsSQL security and Windows Integrated security. Update the connection string to suit your use case. In the example below we are using a local SQL server instance with SQL credentials.

Running Data Checker in the Development Environment

  1. Make sure you have create schema or admin access to a MsSQL server instance so that we can create the database that supports the solution.
  2. Ensure you update the connection string in the “appsettings.json”.
  3. In Visual Studio open the “Package Manager Console”. Usually located in the menu: Tools->Nuget Package Manager->Package Manager Console.

  1. Ensure you have set the MSDF.DataChecker.WebApp project as the startup project by right clicking the project and selecting “Set as Startup Project”.

  1. In the Package Manager Console ensure you have selected the WebApp project in the dropdown for “Default project:” and then run the command “Update-Database”. This will execute the Entity Framework Code First migrations and create the database for you.

  1. Once you have created the database then you can click on IIS Express to run the application.

Installing in IIS

For beta users we are not providing a quick install but they are coming soon.

We recommend you review the following article by microsoft for hosting .Net Core Applications: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1

Publishing to IIS

  1. Publish to your IIS: Right click on the web project and select Publish option

Select folder type and the path to were the files will be published and click Create Profile

Select the configuration Publish and the option "Delete all existing files prior to publish" and click Save

Click on Publish

After the Publish you will see this at the bottom of your output window

  1. Open IIS and select the folder where the files were published and select Convert to Application

You will be able to see the application running on the url https://localhost/DataCheck/

Configure the Client Web Application

If you want to change the name of the application "DataCheck" you need to update the following files with the name you want:

environment.prodlocal.ts

package.json

Need to schedule it?

We provide a Console application that you can schedule with "Windows Task Scheduler".

  1. Build the project MSDF.DataChecker.cmd with the Release configuration, change the connection string of the file "appsettings.json" if need it.
  2. After the build, you will have in the folder Release all the necessary files to execute the program that you can use in the "Windows Task Scheduler".
  3. The required parameters are: "--environmentid" and "--environmentname". If you want to run an entire container you need to add the parameter "--containerid" or if you only want to run a rule then you need to add the parameter "--ruleid".

Example of Use: MSDF.DataChecker.cmd.exe --environmentid "1451E793-F100-4A91-845E-4E45130DCF31" --environmentname "V25 Douglas" --ruleid "8D7363E5-A98B-BB74-5179-1207FFC18A1F"

License

Licensed under the Ed-Fi License.

About

About A very simple data checker that will have a set of files defining SQL statements to do level 2 validations on the ODS database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 48.0%
  • TypeScript 18.7%
  • HTML 17.3%
  • CSS 13.5%
  • PowerShell 2.1%
  • TSQL 0.2%
  • JavaScript 0.2%