Skip to main content

JDBC Task

A JDBC task is a system task used to execute or store information in SQL databases.

Definitions

   {
"name": "jdbc",
"taskReferenceName": "jdbc_ref",
"inputParameters": {
"integrationName": "db-001",
"statement": "SELECT * FROM tableName WHERE id=?",
"parameters": [
"${workflow.input.text}"
],
"type": "SELECT"
},
"type": "JDBC",
"cacheConfig": {
"ttlInSecond": 3600,
"key": "key"
},
"optional": false
}

Input Parameters

AttributeDescription
integrationNameChoose the required database integration. You can only choose the integration to which you have access here.

Note: If you haven’t configured your database on your Orkes console, navigate to the Integrations tab and configure the integration under “RDBMS > Relational Database”.
typeIndicates the SQL statement type. It can take 2 values: SELECT or UPDATE.

  • SELECT - Used to retrieve data from a database.
  • UPDATE - Used to modify existing data from the database.
    • Expected update count - If you have chosen ‘UPDATE’ as the statement type, provide the number of rows to be updated in the database.
statementProvide the SQL statement to retrieve data from the SQL database.

Example: SELECT * FROM tableName WHERE id=?, a query used to retrieve data from a table in a database. Replace tableName with the actual table name.
parametersProvide the query parameters to be bound by the SQL statement. It can be a string, number, boolean, or null.
cacheConfigEnabling this option allows saving the cache output of the task. On enabling, you can provide the following parameters:
optionalEnabling this option renders the task optional. The workflow continues unaffected by the task's outcome, whether it fails or remains incomplete.

Examples



  1. Add task type JDBC.
  2. Choose the integration name.
  3. Choose the Statement Type.
  4. Provide the SQL statement & Query parameters.

Adding HTTP Poll Task