MAS Query Import allows MAS users to capture or store queries as MAS processes.
MAS processes that are imported are organized with namespaces. Prior to using MAS Query Import, users are advised to create namespaces to organized captured queries. Follow the link to learn more about namespaces in MAS.
[Learn more about MAS namespaces]
Steps for Query Import Process Create
The graphic below shows an overview of the query import process.
The steps for performing a query import are:
- Determine a namespace location for process.
- Determine a name for the process.
- Enter all parameters on form. Parameters are listed in the table below.
- Run the process.
- Execute a compile from the "gear" menu.
- Process can now be run.
To use MAS Query Import by execute the process:
New Job Form
The new job form for this process is shown below:
The parameters for this process are documented in the table below.
|fqname|| Fully Qualified Name
The parameters for this process require selection of a full qualified name or “FQN”. A FQN consists of a namespace location and a name for the process. The namespace needs to exist before the query import process is run. The namespace is selected with the dropdown menu. The process name can be any name consisting of letters, numbers, and the underscore character. Note the process name cannot begin with a number.
|dbms|| Select Database Type
The query import process supports Oracle database, Microsoft SQL Server, MySQL, MariaDB, and PostgreSQL. A drop down menu is used to select the database associated with the query import. Note that only one database can be selected. An ANSI query which can be executed against multiple databases, requires separate executions of query import, with different databases specified.
|sql|| Single Query Statement
The query import process uses direct connectivity to databases. Query import does not use database command line client in order to execute queries. Because of this, database command line client keywords are not supported. (For Oracle database there is a process that supports SQLPlus commands.) The SQL script for query import must be a single SQL query. Command line commands are not supported. Cursors loops, other control command, and anonymous blocks are also not supported. If an invalid query is provided the process created with query import will fail.
|description|| Description of Process
This is a description of the process.
When all parameters have been entered , run the process. After the process runs successfully, it must be compiled.
Not all MAS users have the compile privilege. By default the "mas" user has the compile privilege. Select the menu in the upper right corner of the screen, to determine if compile is possible. See the screenshot below.
If compile is possible, it will appear in the menu. Select "compile" to run a compile. This will require approximately 5 seconds. After the compile, the new process is ready to use. Select entities and search for the process or navigate to it in the namespace to run the process.