17.1.9.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:


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()

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();
model.export().db(username="user",                         # DB user to use for storing the model
                  password="password",                     # password of the DB user
                  jdbc_url="jdbc_url",                     # jdbc url to the DB
                  model_store="modelstoretablename",       # name of the model store table
                  model_name="model",                      # model name (primary key of model store table)
                  model_description="a model description") # description to store alongside the model