It is neceessary to be connected to a Metadata Repository (MR) in order to work with metadata objects on an AdvancedMiner Server. To learn how to open Metadata Repository see the movie. For now MR is empty, but later it will contain various metadata objects.
The detailed description of how to connect to the Server is in the Technical documentation (in the AdvancedMiner Administration and Installation Guide for Administrators).
In order to work with data it is necessary to create an alias. The alias allows the user to indicate where the data is stored and to choose the type of database: internal GDBase or external one (for optimal performance it is recommended to use the internal database). It is possible to use multiple aliases and databases at the same time.
To initiate a new connection to the database see the movie or follow step by step instructions below:
Go to the Services component (if it is not visible, select Window | Services from the main menu).
Choose the 'Add Alias' action from the context menu of the Alias node.
To connect to internal AdvancedMiner database:
choose the Database driver: GDBase
choose the Database URL: jdbc:gdbase:<DIR>
edit the Database URL and enter the adequate directory name (e.g.): jdbc:gdbase:C:/db
An empty directory should be created on local disk before creating the alias. This directory will contain database files.
Accept the settings by pressing the 'OK' button.
In order to simplify work with database connections, one of the aliases can be marked as default (see the movie). All calls to a database without a specified alias will concern the default one.
After the aliases are registered, the user needs only to specify the alias name to access a particular database.
An alternative way to create an Alias to a database is to do so in a script:
# values of fields user_name and user_password are ignored when GDBase is using dbAlias([driver_name, database_URL, user_name, user_password],alias_name) # new alias can be set as default dbAlias([driver_name, database_URL, user_name, user_password],alias_name, default = 1) # Example: dbAlias(['gdbase.JDBC','jdbc:gdbase:C:/db','',''],'newAlias')
You can copy alias settings from Services component into the script, by right-clicking on the alias, choosing 'Generate Code' and pasting it (Ctrl+V) into the script.