Skip to main content

Create and run models

A minimal model in SA Engine is a folder with a master.osql file in it.

Create a model

To create a model in VS Code, first add a folder by right-clicking the models folder that is placed in your SA_HOME folder. The name of the created folder is the name of your model.

add_model_folder_hand.png

Add a file by right-clicking your newly created model folder.

add_model_file_hand.png

Name the file master.osql.

add_model_name.png

Run a model

To load a model is the same thing as running all instructions in master.osql.

This can be done by manually running the code as described in Code editor - Running code.

It can also be done by running the command models:load().

Read more

Model management such as deploying to edges and creating releases is performed using commands. This is described in Model management.