Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Write


Description:

This Snap executes a SQL delete with the given properties.

Prerequisites:

[None]


Support and limitations:
Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See MySQL Account for information on setting up this type of account.


Views:


InputThis Snap has exactly one document input view.
OutputThis Snap has at most one document output view. If an output view is available, then the original document that was used to create the statement will be output with the status of the delete executed.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.



ME_DB_Snaps_Query_Examples

 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 suggestible and will retrieve available database schemas during suggest values.

Note

The values can be passed using the pipeline parameters but not the upstream parameter.

ExampleSYS
Default value:  [None]


Table name

Required. The table name to execute the delete on.

Note

The values can be passed using the pipeline parameters but not the upstream parameter.


Example: people
Default value:  [None]
 

Delete  Condition (Truncates Table if empty)

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.

Note

Specify a valid WHERE clause for the delete condition. If you leave this field blank, the Snap truncates the table.


Examples

Without using expressions

Using expressions

  • "EMPNO=$EMPNO and ENAME=$EMPNAME"

  • email = $email 

  • emp=$emp

  • "emp='" + $emp + "'"

  • "EMPNO=" + $EMPNO + " and ENAME='" + $EMPNAME+ "'"


Warning
titleCaution

Using expressions that join strings together to create SQL queries or conditions has a potential SQL injection risk and is hence unsafe. Ensure that you understand all implications and risks involved before using concatenation of strings with '=' Expression enabled. 

Multiexcerpt include macro
name

pageOracle - UpdateDefault 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

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute

Example


In this pipeline, we delete an entire table 'Disney' from the 'Snaplogic' schema. 

Note

Give the delete conditions if a certain record or a column is to be deleted. You may also use the MySQL Select Snap to select a name of the record, and then give the delete condition in the MySQL Delete Snap to delete only those particular values from the table that satisfy the delete condition.

Insert excerpt
MySQL Snap Pack
MySQL Snap Pack
nopaneltrue