I have Azure Data Factory Pipeline that has a Copy Data activity with Stored Procedure Sink. The SP takes as an input a table type parameter. Everything works fine so far. But now that SP has changed and I need to add another parameter that should be Max of one of the columns of the Source for my Copy Data activity. I cannot do this inside that SP since it is re-used by other components and takes it as input. Of course I could wrap it into another SP that would calculate that Max and then call the original SP, bu I thought better way would be if I could do that directly form ADF Pipeline. So I thought I could add a new parameter in my Sink SP and somehow get that Max using dynamic content, but I can't figure out a way to reference Source of the Copy Data activity.
Lets say the Source of Copy Data has column Id
and I need to pass the Max value of that column to the SP Sink. Is there a way to do something like max(@Source.Id)
in the SP's parameter value field?
lookup activity
to get maxId,and use it's output as sp's parameter. – Steve Zhao