How to send dataset in Web Activity? ADF

I want to publish data into a Service Bus, from my Storage Account.

I already tried send a simple body and it works fine. But i dont know how should set a data set.

Web Activity Setting

When i run this activity into a pipeline, this send

{
    "myMessage": "Sample",
    "datasets": [{
        "name": "MyDataset",
        "properties": {
            ...
        }
    }],
    "linkedServices": [{
        "name": "MyStorageLinkedService1",
        "properties": {
            ...
        }
    }]
}

and i want send data from the file in dataset. Anyone know how i should set web activity?

Upvotes: 1

Views: 1275

Answers (1)

Sally Dabbah
Sally Dabbah

Reputation: 479

You can achieve that by using "Copy Activity".

Here is a quick demo that I made : I used JsonPlaceHolder API , I want to modify the array and add a custom value by doing a PUT request. check it out here : https://jsonplaceholder.typicode.com/guide/ please read carefully "Updating a resource"

Here is a Json that I want to modify , I added it as a Dataset in ADF. enter image description here

The main idea is to set the Dataset as a source and the sink is a REST API method so we are sending the Dataset as an input to the POST request in Copy activity.

Copy activity:

Source: enter image description here

Sink: enter image description here

You can read more about it here: https://learn.microsoft.com/en-us/azure/data-factory/connector-rest?tabs=data-factory#dataset-properties

Here is the output of the Copy Activity: enter image description here

Upvotes: 2

Related Questions