Archibus Smart Client
Archibus Web Central
Generating Comparison Reports (Data Transfer)
Using the Data Transfer feature, you can generate Comparison reports that compare the data in the database to the data in the import file. Comparison Reports include an insert and update log that document the records that were inserted or updated. The insert and update logs are generated in addition to an error log that is always generated if errors occur.
You can generate Comparison reports when importing data, or you can generate them before you import data. If you generate these reports before importing data, since no other changes are made to the database, these Comparison reports are useful for reviewing changes before you apply them to your data set.
These comparison files are written to the same project\users\<username> subfolder to which Web Central writes long-running report output files (docx). The same workflow rule that clears old report files clears these log and data transfer output files for all users. See About File Deletion from the Server.
Note: For general information about Data Transfer, see Data Transfer Overview.
Comparison Log Format
If you are importing a CSV file or comparing the database to a CSV file, the Comparison reports are in CSV format; if you are importing an XLS file or comparing the database to an XLS file, the Comparison reports are in XLS format. For XLS format, the first line holds a comment with the table name, the second line holds the schema information in the table.field format, and each subsequent line holds a data record. For CSV format, the first commented line holds the schema information; the second commented line gives the number of records processed. You can read any of these log files directly into Excel to see them formatted in columns.
The Insert Log Comparison Report
The Insert log shows the new records that the import created in the database. You can use the Data Transfer wizard to "transfer in" the Insert log. For example, you can open the Insert log in Excel, review it to confirm the data's accuracy, and then import (transfer in) the Insert log file to process the new records.
Using the Error Log Comparison Report to Correct Errors
The error log is a list of all records that failed and the error that attempting that insert or update produced. This file lists the error in one commented row; the subsequent row shows the fields for the record that had the error. Using Excel, you can fix values in the error log, and then use the Data Transfer Wizard to re-import (transfer In) the corrected CSV log file to process the records that failed.
Note: If there are errors, an error log is always generated; it is not necessary to select the Compare action to generate an error log.
Note: The database will not have records that failed insertion, for example, because the record had a validation error. These records will only be recorded in the error log
The title of the error log is in the format afm-dt-tableName-error.csv/.xls
. If the table includes the Data Transfer Status field, the error log shows that field. See Tracking the Status of Fields when Importing .
The Update Comparison Report
The update comparison report is a field-level comparison report. This report shows the primary key, and all field values for a record that had changes. The title of the update log is in the format afm-dt-tableName-updated.csv/.xls
.
Generating Comparison Reports
When you transfer in data, an error log is generated if the transfer routine encounters errors. When you generate Comparison reports, the logs that show the records that were inserted and the log file that shows the records that were updated are also generated.
Before you transfer in data, you can generate Comparison reports to review the data before committing changes. You can also generate Comparison reports when you import data. See How to Import Data.
To generate comparison reports:
- Prepare the import file. See Importing Data.
- Select Compare for the Transfer Action.
- Click Continue.
- Select one of the following to compare to the database:
Local File: Select a file on your workstation.
Server File. By default, this field shows the last file output for this table by this user on the server.
- Click Begin Transfer.
The Progress tab appears from which you can view the progress of the report generation.
The following reports are generated in users\public\archibus\projects\username\dt. The file is created as a CSV or XLS file depending on the file format you are comparing to.
- afm-dt-tableName-inserted.csv or xls
- afm-dt-tableName-updated.csv or xls
- afm-dt-tableName-errors.csv or xls (This is generated only if there are errors.)
If there are no differences between the database and the import file, no comparison reports are generated.