ADF/Synapse all Objects iterate and remove the Underscore

Viewed 58

Wanted to iterate the list of objects/Tables and exclusively for one object which is not getting picked up as there is Underscore between the words "Admin_process" Expectation is to get as "Adminprocess" in the adf/synapse by removing the underscore,such that all objects will be passed to the copy operation.

Objects/Tables list AdminUser Admin_process TempUser

enter image description here

Currently it is above, However is not reading the object "Admin_Process" as there is underscore.

Could you someone please tell me how to handle this case.

Thank you,

1 Answers

You can use replace function in ADF dynamic content.

please follow the demonstration below.

Here I am using an array parameter with keys and the above list of tables as values.

[   
{     
"Objectname": "AdminUser"   
},     
{     
"Objectname": "Admin_process"   
},  
{   
"Objectname": "TempUser"    
} 
]

enter image description here

Parameter array to ForEach activity:

enter image description here

To use replace function, create a set variable activity and give the below expression.

@replace(item().Objectname, '_','' ) 

enter image description here

Output with required result(Underscore removed):

enter image description here

Now you can pass this value to a copy activity inside the same ForEach activity.

Related