IDAX.EXPORT_PMML - Export an analytic model as a PMML model or PMML table

Use this stored procedure to export an analytic model as a PMML model or PMML table and then store it to a file.

Authorization

The privileges held by the authorization ID of the statement must include either of the following authorities:

  • To export an analytic model as PMML model:
    • SELECT privilege for the model
    • Privileges for ALTER_MODEL if the PMM model is stored in an output table that is registered as PMML table for this model in the metadata
  • To export an analytic model from a PMML table:
    • SELECT privilege for the PMML table

Syntax

IDAX.EXPORT_PMML(in parameter_string varchar(32672))

Details

You can call this stored procedure in one of the following ways:

  • The stored procedure exports the analytic model as PMML document to a file or returns the PMML document. If possible, an existing file is overwritten without notice.

    EXPORT_PMML('model=..., type=..., file=..., outtable=...')
    Where model is mandatory.
    • If there is a registered table for the model that contains the PMML document, the stored procedure reads the table, concatenates the rows, and writes them to the file. In this case, the outtable parameter is ignored.
    • If there is no registered table for the model that contains the PMML document, and if the outtable parameter is specified, the stored procedure calls PMML_MODEL to create the table. Then, the PMML document is copied from the table to the file.
    • If a PMML table does not exist, and if an outtable has not been specified, the PMML document is created directly, that is, without an intermediate PMML table, and written to the file.
  • The stored procedure exports an analytic model from a PMML table to a file. The PMML table is specified by the intable parameter. If the PMML table contains more than one model, the model parameter is required to identify the model. If possible, an existing file is overwritten without notice.

    EXPORT_PMML('intable=..., file=..., model=...')
    Where intable is mandatory.

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:
model
The name of the model that is to be exported as a PMML table to a file.
Data type: VARCHAR(64)
type
Optional.
The type of the PMML model that is to be created.
Allowed values are 'standard' and 'spss'.
Default: standard
Data type: VARCHAR(16)
intable
The name of the table that contains the PMML model that is to be exported.
If the PMML table contains more than one model, use the model parameter to identify the corresponding model.
Data type: VARCHAR(256)
file
Optional.
The file (absolute path name) into which the PMML document is written.
If file is not specified, the PMML document is returned by the procedure.
Data type: VARCHAR(256)
outtable
Optional.
The name of the output table into which the PMML model is written.
If the name is not specified, the PMML document is written only to the file.
If a PMML table for the model exists, this parameter is ignored.
You cannot specify this parameter, if the intable parameter is specified.
Data type: VARCHAR(128)

Returned information

If no file is specified, the PMML document is returned.

Example

To export an analytic model as a PMML model:
CALL IDAX.EXPORT_PMML('model=cc_nb_ewd, file=/tmp/cc_nb_ewd.pmml')

To export an analytic model as a PMML table:

CALL IDAX.EXPORT_PMML('intable=pmml_models, model=cc_nb_ewd, file=/tmp/cc_nb_ewd.pmml')