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.
Where model is mandatory.EXPORT_PMML('model=..., type=..., file=..., outtable=...')
- 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.
Where intable is mandatory.EXPORT_PMML('intable=..., file=..., model=...')
Parameter descriptions
- parameter_string
- Mandatory one-string parameter that contains pairs of <parameter>=<value> entries that are separated by a comma.
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')