Specify the mapping of columns between the dataset and your model. For example:
SELECT PREDICT(Trained_Model WITH age = year) FROM dataset
This query matches the age column from Trained_Model to the year column from dataset.
You can use braces to map multiple columns:
SELECT PREDICT(Trained_Model WITH {age = year, income = salary}) FROM dataset
The order of these columns in your WITH clause does not matter, and any missing column names are taken from the FROM clause.
Specify a list of arguments to make a prediction with. When using this form of WITH, you do not provide a FROM clause. For example:
SELECT PREDICT(Flower_Model WITH (5.1, 3.5, 1.4, 0.2, 'setosa'))
This query makes a prediction using Flower_Model on the expression (5.1, 3.5, 1.4, 0.2, 'setosa').
Arguments must be ordered exactly as specified in your CREATE MODEL statement. Missing arguments can be specified by empty commas. For example:
SELECT PREDICT(Flower_Model WITH (5.1, , 1.4, , 'setosa'))
You can use braces to provide multiple sets of arguments:
SELECT PREDICT(Flower_Model WITH ({5.1, 3.5, 1.4, 0.2, 'setosa'}, {6.4, 3.2, 4.3, 1.2, 'versicolor'}))