diff --git a/docs/reference-docs/system-tasks/jdbc.md b/docs/reference-docs/system-tasks/jdbc.md index c3bc4f84..2fb8fa09 100644 --- a/docs/reference-docs/system-tasks/jdbc.md +++ b/docs/reference-docs/system-tasks/jdbc.md @@ -7,39 +7,34 @@ import TabItem from '@theme/TabItem'; # JDBC Task -A JDBC task is a system task used to execute or store information in SQL databases. +A JDBC task is a system task used to execute or store information in SQL databases. ## Definitions ```json -{ -"name": "jdbc_test", -"description": "Edit or extend this sample workflow. Set the workflow name to get started", -"version": 1, -"tasks": [ -{ -"name": "jdbc_task", -"taskReferenceName": "jdbc_task", -"inputParameters": { -"connectionId": "", -"statement": "", -"parameters": [], -"type": "SELECT" -}, -"type": "JDBC", -} -] -} + { + "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 | | ---------- | ----------- | -| connectionId | Provide the connection ID to establish a connection with the SQL database.

For example: **postgres://postgres@localhost/testdb** | -| 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. | -| type | Indicates the SQL statement type. It can take 2 values, SELECT or UPDATE.

| -| parameters | Provide the query parameters to be bound with the SQL statement. It can be a string, number, boolean, or null. | +| 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 @@ -54,7 +49,7 @@ A JDBC task is a system task used to execute or store information in SQL databas
1. Add task type `JDBC`. -2. Provide the Connection ID. +2. Choose the integration name. 3. Choose the Statement Type. 4. Provide the SQL statement & Query parameters. @@ -75,24 +70,19 @@ A JDBC task is a system task used to execute or store information in SQL databas ```json - { -"name": "jdbc_test", -"description": "Edit or extend this sample workflow. Set the workflow name to get started", -"version": 1, -"tasks": [ -{ -"name": "jdbc_task", -"taskReferenceName": "jdbc_task", -"inputParameters": { -"connectionId": "postgres://postgres@localhost/testdb", -"statement": "SELECT * FROM orkes", -"parameters": [], -"type": "SELECT" -}, -"type": "JDBC", -} -] -} + { + "name": "jdbc", + "taskReferenceName": "jdbc_ref", + "inputParameters": { + "integrationName": "jdbcintegrationtest_schema", + "statement": "SELECT * FROM tableName WHERE id=?", + "parameters": [ + "${workflow.input.text}" + ], + "type": "SELECT" + }, + "type": "JDBC" + } ``` diff --git a/static/img/jdbc-worker-task.png b/static/img/jdbc-worker-task.png index 7554daf5..71af4b2c 100644 Binary files a/static/img/jdbc-worker-task.png and b/static/img/jdbc-worker-task.png differ