cSQL
Reads from and writes to any database using a SQL connection based on a query.
cSQL Standard properties
These properties are used to configure cSQL running in the Standard Route framework.
The Standard cSQL component belongs to the Connectivity family.
Basic settings
| Properties | Description |
|---|---|
|
Datasource |
Select the component that opens the database connection to be reused by this component. |
| Output Type | Select the type of the output data.
|
| Batch Mode | Select this checkbox to execute the statement in batch mode. |
| Use SQL statement from message body |
Select this check box if your query statement is specified in the message body. |
| Type | Select the source type of the SQL query. This option is not available if
Use SQL statement from message body is enabled.
|
| Query | This option appears when Built-In is selected from
the Type list. Specify a database query statement, paying
particularly attention to the proper sequence of the fields which must correspond
to the schema definition. If you have installed the R2025-12 Talend Studio Monthly update or a later one delivered by Talend, you can use multi-lines and format the SQL statement as you want. You can also click [...] next to the Query code box to open the SQL Builder and create a query in it. For more information, see Creating queries using the SQLBuilder. |
|
Resource |
This option appears when Repository is selected from the Type list. Select the resource query statement file from the repository. Select the version of the query statement in the Version field if more than one version of the query statement is available. |
|
Resource File |
This option appears when File Path is selected from the Type list. Enter the path to the query statement file in your local file system. |
Advanced settings
| Properties | Description |
|---|---|
| Return generated keys from Inserts | Select this checkbox to retrieve the generated keys when inserting data into
a table configured with an auto-incrementing key using cSQL. The generated keys
are contained in the message header CamelSqlGeneratedKeyRows. For
more information on the message headers supported by cSQL, see Message Headers. To specify which generated columns should be retrieved, click [+] as many times as required to add rows to the Expected keys table and enter the column names. Information noteNote: This option is available only if you have
installed the R2025-12 Talend Studio Monthly update or a later one delivered by Talend. For more information, check with your administrator.
|
|
URI Options |
Set the optional arguments in the corresponding table. Click [+] as many times as required to add arguments to the table. In the Name field, you can either select the URI option from the drop-down list, or enter an option name that is not available in the list. Then click the corresponding Value field and enter a value. See the site https://camel.apache.org/components/latest/sql-component.html for available URI options. |
Usage
| Usage guidance | Description |
|---|---|
|
Usage rule |
cSQL can be a start, middle or end component in a Route. It has to be used with the cSQLConnection component, which creates a connection to the database. For more information about cSQLConnection, see cSQLConnection. |
|
Limitation |
n/a |