Your supply chain model can involve custom extensions, such as Extended Factory (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.
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
- 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.
- Now click the
Add button in the toolbar of the list.
- Provide the database connection parameters:
- Select DB type — select one of the supported DB types: sqlite, sqlserver, postgresql, mysql.
- URL — the database server URL.
- Database name — the name of the database.
- Table name — the name of the database table.
ALX 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.
- 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.
When you import an external table, data is obtained from MS Excel file and saved to the anyLogistix internal database.
To import an external table from a file
- Select External tables in the Experiments section to open the external tables list.
- Click the
Import button in the toolbar of the list. The dialog box will open.
- Click the
Browse button in the Select file field and browse to the file containing the necessary data.
- 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. A new external.db file will be created in C:\Users\Username\.anyLogistix folder. This file contains all external databases that you add to any scenario of any project.
To import an external table from a database
The database that you are importing contains links to the external tables, not the actual data from them. Make sure you have access to the external tables. You may import them from an MS Excel fileThe instruction below shows how to export the external table without the scenario data. If required, you can export external tables with the scenario data to an MS Excel file or to a database.
The external tables are exported to a database as set of connection settings (DB name, DB address, table name, login, password), which are stored in the
database table named export_external_table.
These settings will be used to add a new external table to the scenario.
For more information refer here
To export an external table to a file
- Select External tables in the Experiments section to open the external tables list.
- Select the required external table from the list of available external tables.
- Click the
Export button in the toolbar of the list. The dialog box will open.
- Specify the MS Excel file you want to save the external table data to.
- Click OK to export the table. To cancel exporting the table and discard the dialog box, click Cancel or press Esc.
To add a row
- Click the Add row button. An empty row will be added to the bottom of the table.
To remove a row
- Select a row you wish to remove by clicking any of its cells.
- Click the Remove row button. A row will be removed.
To edit the table data
- Click in the cell that contains the data you want to edit.
- Specify the required data.
- 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
- Select the required external table from the list of available external tables.
- Click the
Delete button in the toolbar of the list. The external table will be deleted.
-
How can we improve this article?
-