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 only local coordinates storage will be used (using an online provider will be too time-consuming). The search through local storage is available by either of the following:
    • Country and City (the Name column is considered if City is not specified)
    • Country and zip Code

To import scenario data from database

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

    The Import 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.

  8. Select Scenarios to import from the drop-down list.
  9. Specify the desired name of the importing scenario in the New scenario name field if you want to change its default name.
  10. Enable Advanced options if you need to modify the import parameters:

    • Import into existing scenario — (disabled by default) a new scenario will be created for the importing file. If enabled, the Select scenario option becomes active.
    • Select scenario — (active only 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 — (selected by default) if disabled, the experiments contained in the database will not be imported.
    • Override existing project conversion rules — if enabled, the unit conversions from the importing file will overwrite the project's existing unit conversions.
  11. Click Import to close the dialog box and import the scenario data. The newly created scenario will be located in the tab that corresponds to the type of the imported scenario:

    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?