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
Attributes | Description |
---|---|
Integration name | Choose 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 type | Indicates the SQL statement type. It can take 2 values: SELECT or UPDATE.
|
Statement | Provide 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 parameters | Provide the query parameters to be bound with the SQL statement. It can be a string, number, boolean, or null. |
cacheConfig | Enabling this option allows saving the cache output of the task. On enabling you can provide the following parameters:
|
Examples
- UI
- JSON Example
- Add task type
JDBC
. - Choose the integration name.
- Choose the Statement Type.
- Provide the SQL statement & Query parameters.
{
"name": "jdbc",
"taskReferenceName": "jdbc_ref",
"inputParameters": {
"integrationName": "jdbcintegrationtest_schema",
"statement": "SELECT * FROM tableName WHERE id=?",
"parameters": [
"${workflow.input.text}"
],
"type": "SELECT"
},
"type": "JDBC"
}