Share via

Pre SQL Script in ADF not working as expected

Chinmay Biswal (ADMCBI034) 1 Reputation point
2021-06-08T12:20:08.517+00:00

I need to write a delete Pre SQL Script in Sink DataFlow. I need to use parameter value in Where condition something like "Delete From ABC where col_name ="+ $parameter1. Concatenation is only showing the value of paramtere1 and not forming the required query

I have tried all possible options and getting errors like column operands are not allowed in literal expressions and column functions are not allowing in constraints.
How to form Pre SQL script with dynamic where clause coming from parameter value.

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


1 answer

Sort by: Most helpful
  1. Nandan Hegde 36,886 Reputation points MVP Volunteer Moderator
    2021-06-08T14:10:10.667+00:00

    Hey, you can use the below query:
    Delete from abc where col_name =@{pipeline().parameters.parameter1}

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.