<< Click to Display Table of Contents >> Navigation: Data Module > Import & export > Importing data |
Data import into relational databases is complex as a result of the numerous constraints inherent to maintain data consistency.
To manage these constraints, most data imports use data mappings that transform data into formats that can be accepted by the database.
Once fully developed, user's typically only need to select files and the appropriate data mapping, before clicking the Import button.
A few formats allow direct mappings (i.e. XML, Excel) where the file being imported is expected to exactly match the database structure.
Definition
Progress
|
The import process uses the SQL Bulk Copy method, as this process is significantly faster than row-by-row processing. This method attempts to insert the entire contents of a source table (i.e. external file) into the destination table (i.e. database). If an error occurs, no records will be inserted, and any attempt to insert data into child tables will fail also. All imports are run inside a transaction, meaning that when a failure occurs all changes are discarded by default. This behaviour can be overridden so any data that can be imported will be, by selecting the Force Save option. Importing data into a database requires some knowledge of the database setup, as there are many constraints on what and when data can be added. The following requirements exist: •Tables must be filled in the correct order (this is handled by the software). •All names in the source file must be exactly the same as those in the database, or after data mapping. •All key, index and required columns in a database table must be present in the source file, or after data mapping. •All data must be compatible with the data types of the associated column, or after data mapping. •All values used in lookup columns should match those in the lookup table, or after data mapping. If not, the user will be shown the Lookup Conflict Resolver. •Data can be imported into any public table. •Any project codes in the source file are overridden with the active project code, except if using the Bulk Import system. •Record update is not supported. |
Click the file type that matches the file to import: Select files to import, and click Open: Select a data mapping (if required) and any other options, then click the Import button:If the Conflict Resolver is shown, fix any issues:Review the log for success or failure, and any other warnings or errors: |
When a conflict is detected on a lookup column, the user is shown the Conflict Resolver: Select replacement codes from the destination (i.e. database):
Once all conflicts are resolved the import will continue. |