Skip to end of banner
Go to start of banner

Azure Synapse SQL Delete

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

In this article

Overview

You can use this Snap to delete records from the target tables.

Snap Type

The Azure Synapse SQL Delete Snap is a WRITE-type Snap.

Prerequisites

  • Valid Azure Synapse SQL Account.

  • Access to Azure Synapse SQL and the required permissions to delete.

Support for Ultra Pipelines  

Works in Ultra Pipelines

Limitations

When the table name contains single quote characters, the No table found error is displayed. This is because of the JDBC driver limitation.

Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min: 0

  • Max: 1

  • Mapper

  • Copy

The records to be deleted.

Output

Document

  • Min: 0

  • Max: 1

NA

The original document with the status of the delete operation.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Asterisk ( * ): Indicates a mandatory field.

  • Suggestion icon ((blue star)): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ((blue star) ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( (blue star) ): Indicates that you can add fields in the field set.

  • Remove icon ( (blue star)): Indicates that you can remove fields from the field set.

Field Name

Field Type

Description

Label*

Default ValueAzure Synapse SQL - Delete
ExampleDelete Rejected Employee List

String

Specify a unique name for the Snap.

Schema Name

 

Default Value: N/A
Example: "dbo"

String/Expression/Suggestion

Specify the database schema name from which you want to delete the record.

If you do not specify the schema name, then the suggestion for the Table Name fetches all tables names of all schemas.

Table Name

 

Default Value: N/A
Example: "dbo"."Employee"

String/Expression/Suggestion

Specify the table name to execute the delete on.

Delete Condition (Truncates Table if empty)

Default Value: N/A
Examples

Without using expressions

  • EmpId = 12 

  • email = 'you@example.com'

Using expressions

  • email = 'you@example.com' or email = $email 

  • emp=$emp

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

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

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

String/Expression

Specify the SQL WHERE clause of the delete statement. You can specify the delete from an upstream Snap or through the Pipeline parameters.

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

Caution

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

Number of Retries

Default Value: 0
Example: 3

Integer/Expression

Specify the maximum number of retry attempts to make to receive a response. The request is terminated if the attempts do not result in a response.

Retry interval (Seconds)

Default Value: 1
Example: 10

Integer/Expression

Specify the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception. 

Snap Execution

Default ValueExecute only
Example: Validate & Execute

Dropdown list

Select one of the following three modes in which the Snap executes:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Example

Deleting Employee Table from the Azure Synapse SQL Database

This example Pipeline demonstrates how to delete employee records from the employee table by specifying a delete condition.

Step 1: Configure the File Reader Snap to read the EmployeeData.csv file from the SL database.

On validation, the Snap generates output in binary format.

Step 2: Configure the CSV Parser Snap to parse binary data and generate output in document format.


Step 3: Configure the Mapper Snap to extract only the Employee ID row from the incoming data.

On validation, the Snap generates EMP_ID of all the employees in the output.

Step 4: Configure the Azure Synapse SQL Delete Snap to delete employee records from “dbo”.”Employee1” table. Also, specify the Delete Condition to prevent the deletion of rows other than the EMP_ID row from the table.

On validating the Pipeline, the Snap generates output with the status of the deleted records.

Download this Pipeline

Downloads

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Provide Pipeline parameters as applicable.

  File Modified
You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.
No files shared here yet.
  • Drag and drop to upload or browse for files
  • Snap Pack History

     Click here to expand...

    Release

    Snap Pack Version

    Date

    Type

    Updates

    May 2024

    437patches26597

    Latest

    Fixed an issue with the Azure Synapse SQL Select Snap that displayed an error and did not retry the connection when the serverless SQL pool was warming up.

    May 2024

    main26341

    Stable

    February 2024

    436patches25597

    -

    Upgraded the jOOQ library of the Azure Synapse SQL Snap Pack from v3.9.1 to v3.17.x.

    This upgrade is currently NOT available with the latest distribution. However, you can still consume this patch through 436patches25597. This update is scheduled to be included in the latest distribution release on April 10, 2024, and will be a part of the stable distribution with the GA release on May 8. 2024.

    Behavior change:

    The jOOQ library upgrade for Azure Synapse SQL Snap Pack, done as part of the 436patches25597, resulted in the following behavior change:

    Previously, when “null”(string) was passed from the upstream Mapper Snap for the Bigint datatype, the Azure Synapse SQL Update Snap updated it as null without displaying any error. It displayed the status as 0 and the output message as Success. Now, the Snap displays the following error in this scenario:

    Error converting value(expecting a number but you are sending String(“null”))

    If you pass null from Mapper Snap with the expression enabled, the Snap updates the null value for the BigInt datatype correctly, as earlier.

    February 2024

    main25112

    Stable

    Updated and certified against the current SnapLogic Platform release.

    November 2023

    main23721

    Stable

    Updated and certified against the current SnapLogic Platform release.

    August 2023

    main22460

    Stable

    The Azure Synapse SQL - Execute Snap now includes a new Query type field. When Auto is selected, the Snap tries to determine the query type automatically.

    May 2023

    433patches21718

    Latest

    Fixed an issue with the Azure Synapse SQL Bulkload Snap that caused a 404 error when the External Location was set to ADLS Gen2 and the Azure Folder field was not specified in the account settings.

    May 2023

    main21015

    Stable

    Upgraded with the latest SnapLogic Platform release.

    February 2023

    432patches20389

    Latest

    The Azure Synapse SQL Account and Azure Synapse SQL Active Directory Account now support the latest JDBC Driver 12.2.0.jre11 by default. You do not have to upload the JAR file in the JDBC Driver field manually.

    February 2023

    main19844

     

    Stable

    Upgraded with the latest SnapLogic Platform release.

    November 2022

    431patches19493

    Latest

    The Azure Synapse SQL - Bulk Load Snap no longer fails when loading the JDBC driver from SLDB as it now uses the uploaded JAR driver when performing all bulk load operations.

    November 2022

    431patches19410

    Stable

    Fixed the Azure SQL - Execute Snap using the Azure SQL Active Directory Account that failed with SQL operation failed errors in environments using federated authentication

    November 2022

    431patches19410

    Latest

    Fixed the Azure SQL - Execute Snap using the Azure SQL Active Directory Account that failed with SQL operation failed errors in environments using federated authentication

    November 2022

    431patches19354

    Latest

    The Azure Synapse SQL - Bulk Load Snap no longer fails with the error Invalid column value in CSV data file when the data contains the field quote character (").

    November 2022

    431patches19263

    Latest

    The Azure Synapse SQL Insert Snap no longer supports the Preserve Case Sensitivity checkbox.

    November 2022

    main18944

    Stable

    Introduced the Azure Synapse SQL Snap Pack. The Azure Synapse Analytics is service from Microsoft that helps you query data to create, update, insert, or delete data in the Azure Synapse SQL. This Snap Pack contains the following Snaps:


    Related Content

    • No labels