Passing Parameter in Azure DataFactory Data flow at source options as Query

Baranidharan R 6 Reputation points
2022-08-12T10:27:14.457+00:00

Different Methods I have tried as Expression for Query, But none of them is working. I am need of help to solve the issue.

Parameter passed in Dataflow: Code = 'CAF1'

Methods:
concat(toString("Select * from TableName where Column1 = "), toString($Code))
concat("Select * from TableName where Column1 = ", toString($Code))
concat("Select * from TableName where Column1 = ", "{$Code}")
"Select * from TableName where Column1 = {$Code}"

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,457 questions
{count} vote

2 answers

Sort by: Most helpful
  1. AnnuKumari-MSFT 30,361 Reputation points Microsoft Employee
    2022-08-13T14:34:45.987+00:00

    Hi anonymous user ,

    Welcome to Microsoft Q&A platform and thanks for posting your question.

    Kindly try with the below query : "Select * from TableName where column1='{$Code}'" since value present in the parameter 'Code' is a string, it needs to be enclosed within a single quotes to form the query as select * from TableName where column1='CAF1'

    230890-image.png

    230955-image.png

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png button and take satisfaction survey whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.

  2. Baranidharan R 6 Reputation points
    2022-08-22T10:35:25.133+00:00

    Yes this fixed the issue. Thank you so much for the support

    0 comments No comments