You can provide the model table either as an input file (as in the first call) or in the Model attribute (as in the second call). When you provide the model table as an input file, you must specify PARTITION BY ANY and the Responses argument.
DROP TABLE IF EXISTS nb_iris_predict; CREATE TABLE nb_iris_predict (PARTITION KEY(id)) AS SELECT * FROM NaiveBayesPredict ( ON nb_iris_input_test PARTITION BY ANY ON nb_iris_model AS model DIMENSION IDCol ('id') NumericInputs ('[1:4]') Responses ('virginica', 'setosa', 'versicolor') ) ORDER BY id;
DROP TABLE IF EXISTS nb_iris_predict;
CREATE TABLE nb_iris_predict (PARTITION KEY(id)) AS
SELECT * FROM NaiveBayesPredict (
ON nb_iris_input_test
Model ('nb_iris_model')
IDCol ('id')
NumericInputs ('[1:4]')
) ORDER BY id;