IDAX.LIST_MODELS - List selected or all models

Use this stored procedure to list all models or the selected models.

Authorization

The privileges held by the authorization ID of the statement must include at least one of the following authorities:

  • CONTROL privilege on the model
  • SELECT privilege on the model
  • DATAACCESS authority

Syntax

IDAX.LIST_MODELS(in parameter_string varchar(32672))

Parameter descriptions

parameter_string
Mandatory one-string parameter that contains pairs of <parameter>=<value> entries that are separated by a comma.
Data type: VARCHAR(32672)
The following list shows the parameter values:
format=short
Optional.
A column subset is printed. All columns are of varchar type with minimal size, that is, size of the shortest entry.
Use this format for interactive work on the command line.
Default.
format=long
Optional.
All columns are printed.
If a print of the column subset is not sufficient, specify this format parameter to access and work the full data set.
schema
Optional.
Only models in this schema are displayed.
Default: current schema
Note: You cannot specify schema and all=true at the same time.
all
Optional.
If you specify all=true, models from all schemas are displayed.
Note: You cannot specify all=true and schema at the same time.
where
Optional.
Filters the result.
outtable
Optional.
If you specify a regular table or a declared global temporary table, the result set is not displayed but written to the specified table.
The table must not exist. If the table that the procedure tries to create already exists, an exception is raised.
If a schema name is not specified, a regular table is created in the current schema.
If the schema name is SESSION, a declared global temporary table is created, for example, SESSION."Foo".
directory
Optional.
Specifies the directory that contains the previously exported .mdl file.
If you specify the directory parameter with the LIST_MODELS procedure, you must also include the name parameter. You cannot use any other parameters with the directory and name parameters.
name
Specifies the name of the file that is generated by the EXPORT_MODEL procedure. You do not need to include the .mdl extension in the file name.
The LIST_MODELS procedure lists the names and some properties of the models in the .mdl file.
format=short
Optional.
A column subset is printed. All columns are of varchar type with minimal size, that is, size of the shortest entry.
Use this format for interactive work on the command line.
Default.
format=long
Optional.
All columns are printed.
If a print of the column subset is not sufficient, specify this format parameter to access and work the full data set.
schema
Optional.
Only models in this schema are displayed.
Default: current schema
Note: You cannot specify schema and all=true at the same time.
all
Optional.
If you specify all=true, models from all schemas are displayed.
Note: You cannot specify all=true and schema at the same time.
where
Optional.
Filters the result.
outtable
Optional.
If you specify a regular table or a declared global temporary table, the result set is not displayed but written to the specified table.
The table must not exist. If the table that the procedure tries to create already exists, an exception is raised.
If a schema name is not specified, a regular table is created in the current schema.
If the schema name is SESSION, a declared global temporary table is created, for example, SESSION."Foo".
directory
Optional.
Specifies the directory that contains the previously exported .mdl file.
If you specify the directory parameter with the LIST_MODELS procedure, you must also include the name parameter. You cannot use any other parameters with the directory and name parameters.
name
Specifies the name of the file that is generated by the EXPORT_MODEL procedure. You do not need to include the .mdl extension in the file name.
The LIST_MODELS procedure lists the names and some properties of the models in the .mdl file.

Returned information

If format=short is specified, the result set columns are MODELSCHEMA, MODELNAME, OWNER, CREATED, STATE, MININGFUNCTION, ALGORITHM, and USERCATEGORY.

If format=long is specified, the result set columns are as follows:

Table 1. Result set columns for the IDAX.LIST_MODELS procedure
Column name Column type Description
MODELSCHEMA VARCHAR(128) The schema of the analytics model that stores the model components
MODELNAME VARCHAR(64) The name of the analytics model
OWNER VARCHAR(128) The name of the owner of the analytics model, that is, a regular user of the database

Initally, the user name of the owner and the user name of the creator are identical.

CREATOR VARCHAR(128) The name of the creator of the analytics model, that is, a regular user of the database

Initally, the user name of the creator and the user name of the owner are identical.

CREATED TIMESTAMP The date and time when the analytics model is created

This value cannot be changed.

MODIFIED TIMESTAMP The date and time of the latest change of the analytics model

This entry is updated when the metadata or the contents of the model are changed.

STATE VARCHAR(128) The state of the model, for example, Creating, Updating, or Complete

Creating means that the model is calculated. Updating means that the model is updated. Complete means that no creation process or update process is running.

While the model is calculated or updated, the access to the metadata or the contents of the model is limited.

DESCRIPTION VARCHAR(4096) A user-defined description of the analytics model

For a new model, this column is NULL. You can update the column after the model generation is completed.

COPYRIGHT VARCHAR(128) A user-defined copyright notice for the analytics model

For a new model, this column is NULL. You can update the column after the model generation is completed.

MININGFUNCTION VARCHAR(64) The mining function of the model, for example, clustering, classification, regression, associations, time series
ALGORITHM VARCHAR(64) The name of the algorithm that is used to create the analytics model
COMPONENTFORMAT VARCHAR(16) A version identifier that indicates the format of the model components
SOURCE VARCHAR(128) The source of the model, for example, Local.
APPLICATIONNAME VARCHAR(128) The name of the application that creates the analytics model

This value is derived from the DB2® version.

APPLICATIONVERSION VARCHAR(64) The version of the application that creates the analytics model
USERCATEGORY VARCHAR(64) A user-defined category name, for example, a project name

Example

CALL IDAX.LIST_MODELS('format=short, where=owner=''JDOE'' and algorithm=''Naive Bayes''')
This call returns the following result set:
Result set 1
--------------
MODELSCHEMA MODELNAME OWNER    CREATED                 STATE    MININGFUNCTION ALGORITHM   USERCATEGORY
----------- --------- -------- ----------------------- -------- -------------- ----------- ------------
JDOE        NBX       JDOE     2015-02-24-15.27.22.547 Complete classification Naive Bayes - 

1 record(s) selected.

Return Status = 0