Table 1 shows the relationship between the import function, the returned data type, and the sample table.
A PMML model is an XML document. Therefore the XML encoding specification in the XML header is respected. You can override this encoding specification. For example, specifying a different XML encoding might be required if the encoding that is specified in the file is an unsupported name for a supported code page, or if the encoding of the file was changed without changing the encoding that is written in the file.
If an encoding specification does not exist, UTF8 is assumed.
In the table below, the import functions for files that use a specific XML encoding are designated with the character E at the end of their names, for example, DM_impClusFileE.
| Import function | Data type | Table |
|---|---|---|
| DM_impClasFile, DM_impClasFileE | DM_ClasModel | IDMMX.CLASSIFMODELS |
| DM_impClusFile, DM_impClusFileE | DM_ClusteringModel | IDMMX.CLUSTERMODELS |
| DM_impRegFile, DM_impRegFileE | DM_RegressionModel | IDMMX.REGRESSIONMODELS |
| DM_impRuleFile, DM_impRuleFileE | DM_RuleModel | IDMMX.RULEMODELS |
| DM_impTsFile, DM_impTsFileE | DM_TimeseriesModel | IDMMX.TIMESERIESMODELS |
db2 insert into IDMMX.CLUSTERMODELS (MODELNAME, MODEL)
values( 'CustomerSegments',
IDMMX.DM_impClusFileE('/tmp/myclusters.xml', 'iso-8859-1' )
SQL0443N Routine ... has returned an error SQLSTATE with diagnostic text "E 8906: File ...". SQLSTATE=38M01
If an existing file cannot be read, a read permission might be missing. The file might be accessible for the current user account, but not for the database because the database process that tries to access the file might be run by another user account that does not have the permission to read the file.
To fix the problem, you can provide the missing read permission for the user account or you can start the database process with a different user account that already has the required read permission.
Providing read permission for the user account
On Windows, the database is running as a Windows service. You can display the Windows services by selecting .
ps -fu <instance owner> | grep " db2"