Danny Valenzuela
Danny Valenzuela

Reputation: 11

Sending a JSON file in Data Factory in Azure

I have looked all over and can't find exactly what i am trying to do. I am trying to send a json file to an external client. The json file is a blob storage and is called kimblejob.json I have it pointing to a Web activity that has the authenticaton already set as basic. I have the json file under Datasets. Now, every time I put something in the body, that is the what gets posted and not the file. How do I get the file to post and not what is in the body? What do I put in the body? How do I direct it to send the json file and not the content of the body? Thanks

enter image description here

Upvotes: 1

Views: 1374

Answers (3)

Shan Sudarshan
Shan Sudarshan

Reputation: 9

You can pass an output (JSON) from a Web Activity into the body of another Web Activity without having to use Copy data and blob storage.

Upvotes: 0

Kuldip Joshi
Kuldip Joshi

Reputation: 47

You can use lookup activitiy to look to that file. It will have 4 mb limit though . Output from lookup you can use it to provide body of web activitiy.

Upvotes: 1

mjonsing
mjonsing

Reputation: 74

According to docs it is not possible to copy data to a REST endpoint, only from. You can read more about that on this page https://learn.microsoft.com/en-us/azure/data-factory/connector-rest on MS Docs.

You can also read about all supported data stores and formats on this link https://learn.microsoft.com/en-us/azure/data-factory/copy-activity-overview#supported-data-stores-and-formats. If you scroll down to Generic protocol you will see that HTTP and REST is not supported as a sink.

Screenshot showing the HTTP and REST is not supported as sinks in ADF

Putting a dataset reference in a Web activity will only pass the metadata of the dataset and the linked service in your http POST - it will be up to the receiving API to know what to do with it.

In the past scenarios I've had where we need to upload data to a REST API I have landed the data temporarily in a storage account and then called a Azure Function to handle the upload to the REST endpoint.

Upvotes: 2

Related Questions