2
votes

i am new to Azure data factory. I have a source dataset that is linked to a REST api. The url of this API has a query string. I have an activity that copy data from REST to Database. But i have to pass different values in query string and run the same activity against different values. How can this be done in Azure Data Factory?

enter image description here

i kind of reached here. but how to pass the value of this "HospitalCode" ?

1

1 Answers

5
votes

Please try something like this:

1.create a pipeline and set a variable(your HospitalCode):

Name:CodeArray Type:Array DEFAULT VALUE:["01","02"]

2.create a ForEach Activity:

Items:@variables('CodeArray')

3.create a Parameter name is code,type is String.

Setting of Linked service like this: enter image description here dynamic content:@concat('pjjs/pls?HospitalCode=',dataset().code)

4.Setting of Copy Activity's Source enter image description here

Hope this can help you.