RubiSQL is a feature within Code Fusion that helps write code in SQL to modify the values in your database. It also allows you to delete values in your database.
You can use the RubiSQL node as a stand-alone node or connect it to the Reader node (dataset) or other algorithm nodes. You can connect multiple predecessors or preceding tasks to a single RubiSQL node.
To use RubiSQL, follow the steps given below.
If required, connect other nodes to RubiSQL in your algorithm flow.
Note: | You can connect multiple predecessors to RubiSQL. |
The available properties of RubiSQL are as shown in the figure given below.
The table given below describes the different fields present on the Properties pane of RubiSQL.
Field | Description | Remark | |
Task Name | It is the name of the task selected on the workbook canvas. | You can click the text field to edit or modify the name of the task as required. | |
Connection | It allows you to select the SQL database. | You can select a connection from the list of available ODBC connections (PostgreSQL, SQL, MySQL, Oracle, and ODBC). | |
Single Select Statement | It allows you to decide whether the RubiSQL data is to be passed to the successor node or not. | Select this checkbox only if your RubiSQL code is a Single Select Statement. | |
Configure | It allows you to enter SQL code. | — | |
Advanced | Node Configuration | It allows you to select the instance of the AWS server to provide control on the execution of a task in a workbook or workflow. | For more details, refer to Worker Node Configuration. |
The RubiSQL configuration page is displayed.
The fields/icons on the RubiSQL configuration page are described in the table below.
Icon/Field | Description |
Custom Output Variables | It displays a list of output variables created by you. These variables are stored in the form of a Dictionary. Note: This field is available only if the Single Select Statement checkbox is selected. |
SQL Editor | The SQL Editor helps you to add your SQL statements. Refer to Using SQL Editor. |
TRAINING REQUIRED | Functionality is coming soon. |
Minimap |
|
Theme |
By default VS-Dark theme is selected. |
| It helps you to maximize the Code Editor page. |
It saves the changes and closes the configuration page, and returns you to the workbook canvas. | |
It cancels the changes and closes the configuration page. |
Click Save.
The RubiSQL code is saved.
Note: | If your SQL code has only one Select statement, select the Single Select Statement checkbox on the Properties pane. It allows you to pass the result of the Select statement to the successor node. |
Run the algorithm flow for the RubiSQL Refer to Running a Workbook.
The RubiSQL code is executed.
Notes: |
|
The table below explains the above code snippet.
Line of Code | Interpretation |
| SQL statement to delete all the rows from the |
| SQL statement to select all the rows from the database |
In the above code,
demodb.iris_mysql
– Name of the databasePetalWidthCm
– Name of a column in the databasevar1
– Name of the variable declared at the workbook level