On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Snap type: | Write | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This Snap allows you to execute arbitrary Cassandra query language (CQL) supported by JDBC.
| |||||||||||||||||||||||||||||||||||
Prerequisites: | Validated Cassandra account, verified network connectivity to Cassandra server and port, and the Cassandra server running. | |||||||||||||||||||||||||||||||||||
Support and limitations: |
| Behavior change: | As part of 436patches25696, when you use a stored procedure in the Cassandra - Execute Snap, the Snap displays Message: Success and $UPDATE_COUNT=-1, 0, or 1 (based on the Snap Pack behavior) in the output. | |||||||||||||||||||||||||||||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring Cassandra Accounts for information on setting up this type of account. | |||||||||||||||||||||||||||||||||||
Views: |
| |||||||||||||||||||||||||||||||||||
Settings | ||||||||||||||||||||||||||||||||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||||||||||||||||||||||||||||||
SQL statement | Required. Specifies the SQL statement to execute on the server.
Cassandra Snaps do not support batch operations, which is why this field does not support SQL bind variables in it. There are two possible scenarios that you encounter when working with SQL statements in SnapLogic. You must understand the following scenarios to successfully execute your SQL statements: Scenario 1: Executing SQL statements without expressions
Examples:
Additionally, the JSON path is allowed only in the WHERE clause. If the SQL statement starts with SELECT (case-insensitive), the Snap regards it as a select-type query and executes once per input document. If not, it regards it as write-type query and executes in batch mode. Scenario 2: Executing SQL queries with expressions
Examples:
Default value: [None] This Snap does not allow you to inject SQL, such as select * from people where $columnName = "abc". Only values can be substituted since it uses prepared statements for execution, which, for example, results in select * from people where address = ?.
| |||||||||||||||||||||||||||||||||||
Query type | Select the type of query for your SQL statement (Read or Write). When Auto is selected, the Snap tries to determine the query type automatically. Default Value: Auto | |||||||||||||||||||||||||||||||||||
Pass through | If checked, the input document will be passed through to the output view under the key 'original'. This property applies only to the Execute Snaps with SELECT statement. Default value: True | |||||||||||||||||||||||||||||||||||
Ignore empty result | If selected, no document will be written to the output view when a SELECT operation does not produce any result. If this property is not selected and the Pass through property is selected, the input document will be passed through to the output view. | |||||||||||||||||||||||||||||||||||
Number of retries | Number of times that SnapLogic tries the process before displaying an error.
| |||||||||||||||||||||||||||||||||||
Retry interval (seconds) | Number of seconds between retries. | |||||||||||||||||||||||||||||||||||
|
|
Troubleshooting
- Run Cassandra JDBC driver using another JDBC tool to verify syntax and results.
Example
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|