Loading Simple Item Types

Let’s work through an example of a loading some Parts data into a database. As we go through this example, the Specifications Window parameters are explained. Below is a sample data file that we use in this example. It is stored in Parts.txt. Although created in Excel, it was saved out as a tab delimited text file to be used with the Batch Loader.

To load the Parts.txt into a database:

  1. Start the BatchLoader.exe
  2. Select New from the main Tool Bar. Notice that the Configuration Pane appears differently, as shown below. All these properties and their values are saved in the configuration file for future use.

  1. The following are explanations of the properties of this window:
    • Server – The connection URL for Aras Innovator. If all the defaults were taken during the Aras Innovator installation, the path should be something such as: http://localhost/InnovatorServer. If unsure, check in IIS to get the exact path. This URL should not include reference to the /Client folder
      Please, note that there are no ‘user’ and ‘password’ fields available. Batch Loader uses embedded browser to process login to Aras Innovator server.

      In case when Aras Innovator server is configured for Client Certificate Authentication, Batch Loader shows additional dialog for certificate selection. User can select appropriate certificate that will be used for further authentication flow.

    • DataFilePath – The fully qualified path to data file that contains the data to be loaded into the database. In our case this is C:\Parts.txt
    • Delimiter – the delimiter used to separate data, usually a tab (\t), or a space ( ), or a comma (,).
    • WorkerProcesses – The number of worker processes to be used by the Batch Loader while loading data. Recommend using the default of 1.
    • Threads – The number of threads per worker process. Recommend using the default of 1.
    • LinesPerProcess – The number of lines in the data file that are loaded by a single worker process. If the worker process finishes processing all its lines and the data file has more lines to be processed, then a new worker process is started.
    • Encoding – Encoding (or codepage number) of data file
    • FirstRow – The number of the row where the actual data starts. Sometimes the first row is used for row headings. In that case, the data starts in the second row. (See FirstRowIsColumnNames property below.)
    • LastRow – The number of the row where the actual data stops. Default of -1 indicates that the file should be read until the end of the file
    • LogFilePath – The fully specify the name of the log file where all information and errors are to be written by the Batch Loader.
    • LogLevel – The Level of detail included in the logging.
      • Low, recommended for automated jobs with low risk on failure. Details about start and stop, and how many items succeeded.
      • Medium, recommended for use while developing new Batch load job. Logs details about failure, as well as details logged in low mode.
      • High, recommended for debugging. Provides detail and AML about every line loaded.
    • PreviewRows – The number of rows visible in the Preview Pane
    • MaxColumns – The number of columns in the Preview Pane.
    • FirstRowIsColumnNames – When set to True, the Batch Loader starts parsing the data file from the second row after the FirstRow value.
  2. Let’s fill out the information in the Configuration Pane as follows:

    • FileName – C:\Parts.txt
    • Server – http://localhost/InnovatorServer
    • LogFilePath – C:\Parts.log
    • FirstRowIsColumnNames – True

This takes care of all the auxiliary properties and settings. The next step is to set up the data mappings from the values in the data file to the items and properties in the database. Notice that the data file contains 8 columns – Number, Name, Description, Assigned Creator, Designated User, Type, Unit, and Make/Buy. So, we have to specify that we are importing instances of Part with 8 property values.
To set up the data mappings using the Batch Loader UI, there are two options. First, you can use the template wizard to build a basic template for loading. Or second, you can use a predefined template loaded from a file. For simplicity’s sake, we walk through using the wizard. Creating templates is covered in the command line execution of the batch loader. Or finally, you may edit the AML template directly in the Template Pane.

Note
Changes made in the AML template during a session are saved only if you use the Save button next in the AML Template pane.

  1. From the template pane, select Wizard. A new dialog is brought up for data mapping:

  1. Select the name of the ItemType from the first dropdown, Part in our case.

  1. Select Part from the Item Type scroll list.
  2. Next, you need to map each column in the data file to each corresponding property of the ItemType. Click on the down arrow of the Target Property to select the property that receives the values in this column. Any properties of type Item are mapped by keyed name of the target Item.
  3. Click OK once all mappings are finished. You should see the mappings displayed in the Batch Loader template pane.

  1. Click Save in the main tool bar and save this configuration file. The configuration file (with an .ibl extension) saves all the Configuration Pane settings, such as the server path, and the data file name, as well as all the data mappings.
  2. Click Verify in the main tool bar to make sure that there are no errors in the AML template.
  3. Click Load.
  4. Log into Aras Innovator, using the same database that you specified for the data load.
  5. Select Design>Parts and click the Search icon. The parts we loaded should appear.