modzyClient.submitJobJDBC

Submits a job using JDCB parameters as inputs

modzyClient.submitJobJDBC(String modelId, String versionId, String url, String username, String password, String driver, String query)

Submits a job based on a SQL query made on a database accessed through JDBC.

Parameters

ParameterTypeDescriptionExample
modelIdjava.lang.StringModel identifier provided by Modzy."ed542963de"
versionIdjava.lang.StringThe model’s version number. It follows the semantic versioning format."1.0.1"
urljava.lang.StringJDBC url to connect to the database'jdbc:postgresql://database-host:5432/mydatabase'
usernamejava.lang.StringThe username to access the database'username'
passwordjava.lang.StringThe password to access the database'password'
driverjava.lang.StringThe query to execute, notice that we will try to match the column names to the model input keys, so you'll need to use alias for that.'select description as \'input.txt\' from my-table'
queryjava.lang.StringIf the model supports explainability, flag this job to return an explanation of the predictionsTrue

Returns

com.modzy.sdk.model.Job object with the job status obtained from the server

Examples

Job job = modzyClient.submitJobJDBC("ed542963de", "1.0.1", "jdbc:postgresql://database-host:5432/mydatabase", "username", "password", "org.posgresql.Driver", "select description as \'input.txt\' from my-table");

More specific customization options are provided by the method [modzyClient.getJobClient.submitJob]{doc:javamodzyclientsubmitjob}

JobInput<String> jobInput = new JobInputJDBC("jdbc:postgresql://database-host:5432/mydatabase", "username", "password", "org.posgresql.Driver", "select description as \'input.txt\' from my-table");   
Job job = modzyClient.submitJob("ed542963de", "1.0.1", jobInput, false);