none
Lookup Activity Query Needs to Use Field Data Value In Where Clause

    Question

  • I am having a Lookup Activity in which I am providing an SQL query for my Azure SQL sink. The where clause of the query needs to use the actual data coming from source (after passing through one If activity). I have tried a couple of times but I could not be successful. Please help.
    Thursday, October 11, 2018 5:15 AM

All replies

  • Hi Ray,

    Could you provide more detail information about what kind of source data you want to put in the query?

    Basically, we use expression like 

    select * from @{activity('formerActivity').output.somevalue}
    in the query.
    Thursday, October 11, 2018 6:25 AM
  • I wish to write

    UPDATE dbo.EMPLOYEE SET FIRST_NAME = @{activity('mycopyactivity').output.first_name}

    But this isn't working

    Thursday, October 11, 2018 6:33 AM
  • Could you check  the output value from the output panel to see if there's first_name property?

    Thursday, October 11, 2018 7:37 AM
  • The output column is showing only whether a pipeline activity succeeded or failed, it is not showing any data field.
    Friday, October 12, 2018 6:08 AM
  • The output column is showing only whether a pipeline activity succeeded or failed, it is not showing any data field.

    That's why UPDATE dbo.EMPLOYEE SET FIRST_NAME = @{activity('mycopyactivity').output.first_name} this expression wouldn't work.

    You may need another lookup activity to get the first_name. 

    The output of lookup activity will show the data content.

    Monday, October 15, 2018 1:45 AM