JDBC Database
Overview
To submit a job request, send input items, a model identifier, and a version number.
Modzy can run data stored in JDBC databases. Input items stored in an S3 bucket may include one data file or a directory with multiple data files.
Sample request
POST /api/jobs HTTP/1.1
Host: trial.app.modzy.com
Authorization: ApiKey apikey.modzy
Content-Type: application/json
Accept: application/json
{
"model":{
"identifier": "ed542963de",
"version": "0.0.27"
},
"explain": true,
"input": {
"type": "jdbc",
"url": "jdbc:postgresql://database-server.myapp.com:port/db",
"username": "user",
"password": "password",
"driver": "org.postgresql.Driver",
"query":"select description as \"input.txt\" from models.model"
}
}
Sample response
{
"model": {
"identifier": "ed542963de",
"version": "0.0.27",
"name": "Sentiment Analysis"
},
"status": "SUBMITTED",
"totalInputs": 1,
"jobIdentifier": "2700725a-9c84-40ae-bbeb-4fce0d35424e",
"accessKey": "apikey",
"explain": true,
"jobType": "batch",
"accountIdentifier": "demo-account",
"team": {
"identifier": "demo-team"
},
"user": {
"identifier": "demo-user-id",
"firstName": "demo",
"lastName": "user",
"email": "[email protected]"
},
"jobInputs":{
"identifier": ["row1-1"]
},
"submittedAt": "2021-02-02T21:19:52.529+00:00",
"hoursDeleteInput": 1,
"imageClassificationModel": false
}
Request body parameters for JDBC
Parameter | Type | Description |
---|---|---|
model (required) | object | An object that contains the model parameters modelID and modelVersion . |
input (required) | object | Contains the that contains the input parameters. |
explain | string | Sets the explainability feature when a model offers the option. |
timeout | string | A timeout in milliseconds for the job’s status to transition to TIMEDOUT. The job doesn’t timeout if this value is not provided. |
input
object
input
objectParameter | Type | Description |
---|---|---|
type (required) | string | The input type to be processed. Use jdbc. |
url (required) | string | The URL to connect to the database. |
username (required) | string | The username to access the database. |
password (required) | string | The password to access the database. |
driver (required) | string | The JDBC driver to connect to the database. |
query (required) | string | The SQL query to use to get the input item. |
For additional information see Jobs.
Updated 10 months ago