Skip to content

Commit

Permalink
Merge pull request #695 from RizaFarheen/main
Browse files Browse the repository at this point in the history
JDBC Doc Update
  • Loading branch information
nhandt2021 authored Jun 11, 2024
2 parents b923c08 + c30911c commit 6bc6df6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions docs/reference-docs/system-tasks/jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,32 @@ A JDBC task is a system task used to execute or store information in SQL databas
"name": "jdbc",
"taskReferenceName": "jdbc_ref",
"inputParameters": {
"integrationName": "jdbcintegrationtest_schema",
"integrationName": "db-001",
"statement": "SELECT * FROM tableName WHERE id=?",
"parameters": [
"${workflow.input.text}"
],
"type": "SELECT"
},
"type": "JDBC"
"type": "JDBC",
"cacheConfig": {
"ttlInSecond": 3600,
"key": "key"
},
"optional": false
}
```

## Input Parameters

| Attribute | Description |
| ---------- | ----------- |
| Integration name | Choose the required database integration. You can only choose the integration to which you have access here.<br/><br/>**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.<br/><br/><ul><li>**SELECT** - Used to retrieve data from a database.</li><li>**UPDATE** - Used to modify existing data from the database.<ul><li>**Expected update count** - If you have chosen ‘UPDATE’ as the statement type, provide the number of rows you need to update in the database.</li></ul></li></ul>|
| Statement | Provide the SQL statement to retrieve data from the SQL database. <br/><br/>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:<ul><li>**TTL (in seconds)** - Provide the time to live in seconds.You can also pass this parameter as variables.</li><li>**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.</li></ul>|
| integrationName | Choose the required database integration. You can only choose the integration to which you have access here.<br/><br/>**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**”.|
| type | Indicates the SQL statement type. It can take 2 values: SELECT or UPDATE.<br/><br/><ul><li>**SELECT** - Used to retrieve data from a database.</li><li>**UPDATE** - Used to modify existing data from the database.<ul><li>**Expected update count** - If you have chosen ‘UPDATE’ as the statement type, provide the number of rows to be updated in the database.</li></ul></li></ul>|
| statement | Provide the SQL statement to retrieve data from the SQL database. <br/><br/>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. |
| parameters | Provide the query parameters to be bound by 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:<ul><li>**ttlInSecond** - Provide the time to live in seconds. You can also pass [this parameter as a variable](https://orkes.io/content/developer-guides/passing-inputs-to-task-in-conductor).</li><li>**key** - Provide the cache key, which is a string with parameter substitution based on the task input. You can also [pass this parameter as a variable](https://orkes.io/content/developer-guides/passing-inputs-to-task-in-conductor).</li></ul>|
| optional | Enabling this option renders the task optional. The workflow continues unaffected by the task's outcome, whether it fails or remains incomplete. |

## Examples

Expand All @@ -48,7 +54,7 @@ A JDBC task is a system task used to execute or store information in SQL databas
<br/>
<br/>

1. Add task type `JDBC`.
1. Add task type **JDBC**.
2. Choose the integration name.
3. Choose the Statement Type.
4. Provide the SQL statement & Query parameters.
Expand All @@ -74,14 +80,19 @@ A JDBC task is a system task used to execute or store information in SQL databas
"name": "jdbc",
"taskReferenceName": "jdbc_ref",
"inputParameters": {
"integrationName": "jdbcintegrationtest_schema",
"integrationName": "db-001",
"statement": "SELECT * FROM tableName WHERE id=?",
"parameters": [
"${workflow.input.text}"
],
"type": "SELECT"
},
"type": "JDBC"
"type": "JDBC",
"cacheConfig": {
"ttlInSecond": 3600,
"key": "key"
},
"optional": false
}
```

Expand Down
Binary file modified static/img/jdbc-worker-task.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6bc6df6

Please sign in to comment.