Batch Loader Graphical User Interface

The Batch Loader GUI allows the user to set the required parameters interactively prior to loading the data. This GUI is designed to help user new to AML load data into Aras Innovator by providing an interface that provides feedback on how the AML will be written before applying it to the database. For advanced use of AML with this tool, it is recommended you take that Aras Innovator API class, to familiarize yourself with the Adaptive Markup Language (AML).

To start the Batch Loader UI run the BatchLoader.exe file:

The following is a list of toolbar icons, their corresponding menu items, and a brief explanation of what their function is.

Toolbar Icons

Icon

Menu

Description

File --> New Starts a new configuration which can be later saved in an .ibl file. The configuration includes pointers to the Aras Innovator server and the data file to be parsed with specific parsing instructions.
File --> Open Opens an existing configuration file (.ibl). These files contain a specification of data mappings templates, the actual data file to be used, as well as auxiliary information, such as the server pointer, the log file specification, and other settings.
File --> Save Saves the current configuration file to a specified name and location. The configuration file contains a full specification of data mappings, the actual data file to be used, as well as auxiliary information, such as the server pointer, the log file specification, and other settings.
Actions --> Verify Verifies the AML template to be loaded.
Actions --> Load Loads the data into the specified data base, according to the data mappings and other instructions created by the user.
Pauses the database load. Available only after the Load is activated and before it completes.
Stops the database load. Available only after the Load is activated and before it completes.
Clears the log window.

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.

  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.
  3. 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.
    • 1 – Low, recommended for automated jobs with low risk on failure. Details about start and stop, and how many items succeeded. 2 – Medium, recommended for use while developing new Batch load job. Logs details about failure, as well as details logged in low mode. 3 – 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.
  4. 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.

  5. From the template pane, select Wizard. A new dialog is brought up for data mapping:
  6. Select the name of the ItemType from the first dropdown, Part in our case.
  7. Select Part from the Item Type scroll list.
  8. 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.
  9. Click OK once all mappings are finished. You should see the mappings displayed in the Batch Loader template pane.
  10. 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.
  11. Click Verify in the main tool bar to make sure that there are no errors in the AML template.
  12. Click Load.
  13. Log into Aras Innovator, using the same database that you specified for the data load.
  14. Select Design>Parts and click the Search icon. The parts we loaded should appear.

Loading relationships into the database using the Batch Loader is identical to loading the Item instances. The Configurations Pane parameters, such as the data file name and the Server fully specified path, must be completed. Alternatively, you can use an .ibl configuration file that may have these parameters previously set. The difference is of course in the data mappings. Let’s look at the following data file:

  1. Start the BatchLoader.exe
  2. Select New from the main Tool Bar.
  3. Fill out the information in the Configuration Pane as follows:
    1. FileName – C:\BOM.txt
    2. Server – http://localhost/InnovatorServer
    3. Database – InnovatorSolutions
    4. User - admin
    5. LogFilePath – C:\BOM.log
    6. FirstRowIsColumnNames – True
  4. From the template pane, select Wizard. A new dialog is brought up for data mapping:
  5. Select Part BOM from the Item Type dropdown.
    1. The Source Part maps to the keyed_name of the source_id Item
    2. The Related Part maps to the keyed_name of the related_id Item
  6. Click OK once all mappings are finished. You should see the mappings displayed in the Batch Loader template.
  7. 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.
  8. Click Verify in the main tool bar to make sure that there are no errors in the AML template.
  9. Click Load.
  10. Log into Aras Innovator, using the same database that you specified for the data load.
  11. Go to Part X-00012, and look at the added BOM relationships:

The Batch Loader templates are simply AML templates. Because of this, the Batch Loader has all the features of AML when loading data. The previous sections have only walked through some basic Items created using the Template Wizard. The template wizard limits the load to a top-level action of ‘add’, loads only one level of an Item structure at a time, and can only reference item properties through the keyed name. While these limitations are often enough for simple data loads, but often are not enough for regular batch jobs.

  1. Attend the Aras Innovator API class. While this is not required, it is often easier to understand the AML structure when you have finished the lessons of AML in this class.
  2. Review the command line section of this document. The command line section of this document contains further examples of templates, as well as an explanation of the parameterized query in AML.
  3. Review the samples listed in the appendix of this document. To aid users with loading some common ItemTypes into Aras Innovator, an appendix of sample AML templates has been provided.