SQL Language Guide > SQL Language Guide > Elements of SQL Statements > Machine Learning Model (MLM) SQL Syntax
Was this helpful?
Machine Learning Model (MLM) SQL Syntax
Note:  This MLM SQL syntax is only valid on Unix installations.
The syntax of a CREATE MODEL statement is:
 
SQL Syntax Parameter
Description
Path
Path to the model. Can be local storage, HDFS, cloud storage (AWS S3, Azure, GCS).
Memory
Maximum memory per container. Can be increased for large models if there are out-of-memory errors.
Default: 512MB
Minimum 70MB
Signature
The Tensorflow signature definition, the default is “serving_default”.
This is similar to running from the command line:
saved_model_cli show --dir /path/to/model/ --tag_set serve --signature_def serving_default
Credentials
If necessary, can be specified to access the model storage.
Example query for CREATE MODEL:
CREATE MODEL mymodel(input set of(a float4, b float4))
RESULT ROW (x float4)
AS TYPE tensorflow
PATH = '/path/to/model',
MEMORY = 256000000,
SIGNATURE = 'signature1';\p\g
MLM invocation syntax:
Example queries for model invocation (compatible to created mymodel above):
Model deletion syntax:
DROP MODEL [IF EXISTS] model_name
Last modified date: 12/19/2024