8.1.8.1 Storing a Trained Model in Another Database
You can store models in a different database other than the one used for login.
The following code shows how to store a trained model in a different database:
Storing a Trained Model Using
JShell
opg4j> model.export().db().
username("user"). // DB user to use for storing the model
password("password"). // password of the DB user
jdbcUrl("jdbcUrl"). // jdbc url to the DB
modelstore("modelstoretablename"). // name of the model store table
modelname("model"). // model name (primary key of model store table)
description("a model description"). // description to store alongside the model
store();
Storing a Trained Model Using Java
model.export().db() .username("user") // DB user to use for storing the model .password("password") // password of the DB user .jdbcUrl("jdbcUrl") // jdbc url to the DB .modelstore("modelstoretablename") // name of the model store table .modelname("model") // model name (primary key of model store table) .description("a model description") // description to store alongside the model .store();
Storing a Trained Model Using
Python
model.export().db(username="user", password="password", model_store="modelstoretablename", model_name="model", description="a model description", jdbc_url="jdbc_url")
Parent topic: Storing a Trained DeepWalk Model