Test Project 1 Details

This first of the two test projects included with the JFileChecker installation is for comma delimited files with the following column structure:
  1. Comment (text field, no constraints)
  2. Name (text field between 2 and 40 charactes containing only letters and spaces)
  3. Salary (non-negative numeric field accepting numbers with up to 2 decimal places)
  4. Date of Hire (date field accepting dates greater than or equal to 1/1/1950 in MM/dd/yyyy format)
  5. Active (list field accepting only the non case-sensitive values "true" and "false")
Other information to note about this test project is that This is an example of a data file that may be checked for this test project.

Set-Up Information

To set up this test project, the following files located in the installation's sql subfolder can be run in this order:
  1. If running Unix/Linux, edit and run test_1_unix_check_project.sql, if running windows, edit and run test_1_windows_check_project.sql. These files are used to add data to the check_project table for test project #1 and contain defaults for data, log, and file paths that may need to change (so edit the last three lines of the file before running it). The escape character is also different. I've noticed that under Windows/Access, backslashes will get loaded from the query directly into the database "as is" while under Linux/MySQL the backslashes need to be escaped with a second backslash. Please adjust the backslashes in this query appropriately.
  2. run test_1_check_field_1.sql - adds data for handling the first field (Comment)
  3. run test_1_check_field_2.sql - adds data for handling the second field (Name)
  4. run test_1_check_field_3.sql - adds data for handling the third field (Salary)
  5. run test_1_check_field_4.sql - adds data for handling the fourth field (Date of Hire)
  6. run test_1_check_field_5.sql - adds data for handling the fifth field (Active)
  7. run test_1_field_dt_format.sql - adds a date format for Date of Hire
  8. run test_1_field_list_1.sql - adds a list item for Active (list item = "true")
  9. run test_1_field_list_2.sql - adds a list item for Active (list item = "false")
  10. run test_1_project_constraint.sql - defines the all-or-none constraint (Salary and Date of Hire)
  11. run test_1_field_constraint_1.sql - adds Salary to the all-or-none constraint
  12. run test_1_field_constraint_2.sql - adds Date of Hire to the all-or-none constraint

Test data for this project is located in the installation's testdata subfolder in a file named "test_1_data_file.csv". This data file (or any other for this test project) should be copied to the data directory defined by the project's data_path directory (given in the check_project table, defined in item 1 above). Similarly, be sure the data, log, and result directories for this project (per the check_project table) exist and can have data written to them before running JFileChecker. If all is set up and run properly, the result file generated by running JFileChecker against the test project 1 data file should look like this.