Processing file imports
Once the file definition has been done, all that remains is to set up the import processing. This is done using the Service Settings Option in EazySetup and ensuring that the File Import Service is enabled. This service forms part of the TransLution Background Processing service which means that no additional services need to be installed.
There are a few things to be aware of when doing file imports.
- Firstly, once a file has been processed, it is moved out of the import folder where it was left for processing.
- If the Import succeeds, the file is moved to a ARCHIVE folder and if it fails the file is move to an ERROR folder.
- These folders are created for you under the main import folder if they do not already exist.
- Remember that each file type can be imported from a different folder if required.
Also, the table that you are importing into requires a column called FILE_IMPORT_AUDIT_ID. If this column does not exist it is created for you the first time an import is processed.
This column contains the audit id of linking back to the file import. The main reason for this is that it serves as a way to identify all the rows that were imported together. You can also use this to track back to the original source file name which is saved in the FILE_IMPORT_AUDIT table. Row statuses are updated based on the reuslts, see here for details
If you want your function area to run only against the most recently imported rows you have a few options:
Import rows with a specific process status and use the function to update the process status as it processes the rows.
Only execute against rows with the highest FILE_IMPORT_ID, this will always be the last import.
If you don't care about which rows were imported, you can simply use your function to process all the rows in the import table. This is probably not a good idea since the table size could grow rapidly if large volumes of data are imported.