Share via


Azure Data Factory - REPLACE FUNCTION , pass previous activity result as TEXT and NEW TEXT

Question

Thursday, January 16, 2020 2:09 AM

Hi Gurus,

I am seeking your help to figure out a way with which we can use previous activity result as SEARCH CONDITION AND NEW CONDITION in replace function.

example:

Lookup Activity => Fetch a Folder Pattern

Get Metadata Activity => Fetch Name Child Item values

so what I want to do is

replace (Lookup Activity, "SEARCH CONDITION FROM LOOKUP RESULT","REPLACE WITH GET METADATA ACTIVITY RESULT")

@replace(@{activity('LKP - Fetch Job Parameters').output.firstRow.IN_Folder_Path},'<<SOURCESYSTEM>>','@{activity('Get Source Systems').output.childItems}')

Here, 

@{activity('LKP - Fetch Job Parameters').output.firstRow.IN_Folder_Path} => will be the value from previous activity which will be the text 

<<SOURCESYSTEM>> => Is the text that I want to replace out of the value from previous activity above

@{activity('Get Source Systems').output.childItems} => want to replace <<SOURCESYSTEM>> with the value of activity 

as in REPLACE function, OLDTEXT and NEWTEXT has to be in quotes this is causing a grief.

Any help will be much appreciated.

Regards

GS

Regards Gursethi Blog: http://gursethi.blogspot.com/ ++++ Please mark "Propose As Answer" if my answer helped ++++

All replies (1)

Thursday, January 16, 2020 4:07 AM âś…Answered

Thanks I did that

@replace(activity('LKP - Fetch Job Parameters').output.firstRow.RAW_Folder_Path,'<<SOURCESYSTEM>>',item().Source_System_Code)

Regards

GS

Regards Gursethi Blog: http://gursethi.blogspot.com/ ++++ Please mark "Propose As Answer" if my answer helped ++++