Integrity Testing

<< Click to Display Table of Contents >>

Navigation:  General Functions > Import / Export > Import >

Integrity Testing

When the import engine processes a file for import, it first runs a series of integrity tests.  Integrity testing is performed in addition to any business rules that may have been defined for the various import columns.  

The following tests are performed

Test

How Performed

Result if Failure

Has file already been imported?

MIE checks time/date stamp of the last time the file was updated and compares it to what the MIE has on file.  If the two match, it means the file has not been updated since it was last imported.

The file will not be imported and the job will log one error.  The error logged by the job can be trapped by the Timed Operations processor, causing notification to be triggered and/or a specific workflow to be triggered.

File header test

When the import job is setup, the names of the various column headers that are used to import data are recorded.  Only the names of columns in the source CSV file that are actually used to source data to the MIE are recorded (there may be many columns in the source file that the MIE is ignoring).  Those columns that have been recorded are checked for presence in the current source file.  If any column is missing, an error is recorded.

The file will not be processed and error(s) will be logged.

Line-by-line integrity test

If the header passes, then the file is pre-read, line by line, and each line is parsed and compared to the header.  The number of columns defined by the header is compared to the number of columns parsed for each line.  If a mis-match occurs in any line, an error is reported that too many or too few columns were encountered versus what was expected (based on the file header).

The file will not be processed and error(s) will be logged.

Double quote count

Double quotes are used to delimit text values in CSV files.  The MIE does not allow a double quote character to be used as anything other than text delimiters (the MIE will not accept text that has a double quote character embedded in it).  The MIE counts the number of double quotes encountered on each CSV line and returns an error if the count is uneven.

The file will not be processed and error(s) will be logged.

Data length test

For text values, the MIE counts the characters about the be stored in the database and compares the count to the maximum capacity of the target database column.  If the number of characters to be stored exceed the column's capacity, the text is truncated and a warning is recorded.

All characters past the target column's physical capacity are truncated, and the remaining string is stored.