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
Parameter | Type | Description | Example |
---|---|---|---|
modelId | java.lang.String | Model identifier provided by Modzy. | "ed542963de" |
versionId | java.lang.String | The model’s version number. It follows the semantic versioning format. | "1.0.1" |
url | java.lang.String | JDBC url to connect to the database | 'jdbc:postgresql://database-host:5432/mydatabase' |
username | java.lang.String | The username to access the database | 'username' |
password | java.lang.String | The password to access the database | 'password' |
driver | java.lang.String | The 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' |
query | java.lang.String | If the model supports explainability, flag this job to return an explanation of the predictions | True |
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);
Updated about 2 years ago