anyLogistix anyLogistix
Expand
Font size

External Tables

Your supply chain model can involve custom extensions, such as XFactory (used in the Factory With Production Lines example), which rely on the data stored outside of anyLogistix. To obtain this data, you can use External tables.

External tables retrieve data from third-party databases or import it from MS Excel files.

The standard set of anyLogistix tables is not affected in this case. The data is added into the external tables only.

Add external table

When you add an external table, anyLogistix retrieves data stored in an external database. The following database engines are currently supported: SQLite, SQL Server, HSQLDB, PostgreSQL and MySQL.

To add an external table

  1. To open the dialog box allowing you to add a new external table, do either of the following:
    • Select File > Add external table... from the main menu
    • Select External tables in the Experiments section to open the external tables list, which will substitute the currently open list of tables.

  2. Now click the Add button in the toolbar of the list.
  3. Provide the database connection parameters:
    • Select DB type - select one of the supported DB types: sqlite, sqlserver, hsqldb, postgresql, mysql. button in the toolbar of the list. The dialog box will open
    • URL - the database server URL.
    • Database name - the name of the database.
    • Table name - the name of the database table.

      anyLogistix imports tables from the default schema only, i.e. from e.g. 'public' schema in case of postgresql database.

    • Login - the database user name.
    • Password - the database password.
  4. Click OK to add the table. To cancel adding the table and discard the dialog box, click Cancel or press Esc.

The table will be added as a new item in the list of External tables below the Project tree.

Import external table

When you import an external table, the data is obtained from the MS Excel file and is saved to the anyLogistix internal database.

To import an external table

  1. Select External tables in the Experiments section to open the external tables list.
  2. Click the Import button in the toolbar of the list. The dialog box will open.
  3. Click the Browse button in the Select file field and browse to the file containing the necessary data.
  4. Click OK to import the file. To cancel importing the file and discard the dialog box, click Cancel or press Esc.

The table will be added as a new item under External tables in the Project tree.

Working with external tables

To add a row

  1. Click the Add row button. An empty row will be added to the bottom of the table.

To remove a row

  1. Select a row you wish to remove by clicking any of its cells.
  2. Click the Remove row button. A row will be removed.

To edit the table data

  1. Click in the cell that contains the data you want to edit.
  2. Specify the required data.
  3. Click elsewhere in the table or press Enter to apply changes. To discard the changes, press Esc. Note that if the table is added from a database, your changes will apply to the data stored in the database.

To delete an external table

  1. Select the required external table from the list of available external tables.
  2. Click the Delete button in the toolbar of the list. The external table will be deleted.

To export an external table to a file

  1. Select External tables in the Experiments section to open the external tables list.
  2. Select the required external table from the list of available external tables.
  3. Click the Export button in the toolbar of the list. The dialog box will open.
  4. Specify the MS Excel file that you want to save the external table data to.
  5. Click OK to export the table. To cancel exporting the table and discard the dialog box, click Cancel or press Esc.
How can we improve this article?