On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Snap type: | Write | |
---|---|---|
Description: | This Snap allows you to execute an SQL delete with the given properties. If a SELECT query is executed, the query's results are merged into the incoming document and any existing keys will have their values overwritten. On the other hand, the original document is written if there are no results from the query. | |
Prerequisites: | [None] | |
Support and limitations: |
- Ultra pipelines: May work in Ultra Pipelines.
- Spark mode: Not supported in Spark mode.
Works in Ultra Tasks. | ||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring SAP HANA |
---|
...
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. | |||||||||
Schema name | The database schema name. In case it is not defined, then the suggestion for the table name will retrieve all tables names of all schemas. The property is suggest-able and will retrieve available database schemas during suggest values.
Example: myschema Default value: [None] | |||||||||
Table name | Required. Table name to execute the delete on.
Example: people Default value: [None] | |||||||||
Delete condition |
...
Required.
SQL where clause of the delete statement.
Example: email = "customer@gmail.com"
Default value: [None]
Execute during preview
Enables you to execute the Snap during the Save operation so that the output view can produce the preview data.
...
(deletes all records from table if left blank) | This is an expression property to specify the SQL WHERE clause of the delete statement. The delete condition may also be passed via an upstream Snap or through the pipeline parameters.
Examples:
Default value: [None] | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Number of retries | Specifies the maximum number of attempts to be made to receive a response. The request is terminated if the attempts do not result in a response. Example: 3 Default value: 0
| |||||||||||||
Retry interval (seconds) | Specifies the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception. Example: 10 Default value: 1 | |||||||||||||
|
|
Examples
This example deletes the records from table 'USER'. After the execution of the pipeline all the user records with age 52 are deleted from table.
...
The delete condition specifies the condition to identify the records to be deleted.
...
The sample output of the Snap looks like below:
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|