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": "jdbcintegrationtest_schema",
"statement": "SELECT * FROM tableName WHERE id=?",
"parameters": [
"${workflow.input.text}"
],
"type": "SELECT"
},
"type": "JDBC"
}

Input Parameters

AttributesDescription
Integration nameChoose 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”.
Statement 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 you need to update in the database.
StatementProvide the SQL statement to retrieve data from the SQL database.

An example statement would be SELECT * FROM tableName WHERE id=?, a query used to retrieve data from a table in a database. Replace tableName with the table name from which you want to retrieve data.
Query parametersProvide the query parameters to be bound with 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:
  • TTL (in seconds) - Provide the time to live in seconds.You can also pass this parameter as variables.
  • Cache Key - Provide the cache key, which is a string with parameter substitution based on the task input. You can also pass this parameter as variables.

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