anyLogistix
Expand
Font size

Importing Data from Database

The scenario data that you plan to import needs to follow certain naming and formatting conventions. To ensure that naming and formatting are correct, you may want to create a scenario template and fill it with your own data.

The coordinates of the objects in the importing scenarios will be automatically filled, unless:

  • The coordinates are already specified in the file (values differ from zero).
  • The file contains more than 200 locations. In this case autofilling of coordinates will be skipped. You can initiate autofilling in the Locations table after the scenario has been imported.

On importing data into the existing scenario, you can add the missing data to it, but be careful.

To import scenario data from database

  1. You can import a scenario by doing either of the following:

    The Import Scenarios dialog box will open:

  2. Select the Database tab to open the database connection settings

  3. Database type — specify one of the supported DB types: sqlite (not available in the Professional Server version), sqlserver, postgresql, mysql.
  4. Database address — specify the location of the database.
  5. Database name — specify the name of the database.
  6. Database login — specify the login that can be used to access the database.
  7. Database password — specify the password that can be used to access the database.

    The type of role and access rules for a user are defined by the administrator of the database. In other words, by using the provided credentials you are accessing the database with the user profile that has certain rights defined by the administrator for you.

    If the connection settings are correct, the section will collapse into a tile, showing the name of the database you are connected to. To change the connection settings, click Change database.

  8. Click the Add scenario to import drop-down list, then select the required checkboxes.

    Multiple import / export supports 10 scenarios. If you are importing e.g. 15 scenarios, the importing process will start for 10 of them, while 5 scenarios will be queued.

  9. Click Add to add the selected scenarios to the import list.
  10. If required, change the name of the importing scenarios by clicking Rename scenario. This option is available if at least one scenario is added to the import list.
  11. If required, you can clear the list of the importing files by clicking Remove all. This option is available if at least two scenarios are added to the import list.
  12. Click Advanced options if you need to modify the import parameters:

    • Import into existing scenario — [not available if you are importing several scenarios] enable to import data into another scenario in the project.
    • Select scenario — [available if the Import into existing scenario option is enabled] click the drop-down list of the currently opened scenarios to specify the scenario to import the data to.

      Prior to importing data into the existing scenario complete the action below:

      1. Explicitly specify the data to be imported in the Sheets to import option, otherwise, all tables will be imported, resulting in data duplication.
      2. Remove the data from the existing scenario that is about to be updated by the imported scenario to avoid data duplication (e.g. when importing demand, clear the existing demand data).
    • Sheets to import — click the drop-down list to select the tables to import (partial import of the importing scenario). All other tables will not be imported.

      If no table is selected, all tables will be imported.

    • Import experiments — [enabled by default] if disabled, the experiments contained in the database will not be imported.
    • Override existing project conversion rules — [enabled by default] the unit conversions from the importing data will overwrite the project's existing unit conversions.
  13. Click Import to close the dialog box and import the data. Scenario will be available in the tab that corresponds to their type:

    If import takes too long, you can cancel it by right-clicking the scenario's tab and selecting Cancel import. This option is available only during the scenario import.

Please note the following possible issues:

  • All the required units (and their corresponding conversions in case of user-defined units) that are missing in the destination project will be imported with the scenario. You will see a warning message with a list of such units.
  • If you are importing from a database that has wrong structure or does not contain an anyLogistix scenario at all, an error message will pop up notifying that the template is missing data.
  • If the importing file has duplicating objects, they will be skipped. The warning message will list such objects
How can we improve this article?