Home > Software engineering >  Get Storage Account Name from Data Factory Linked Service
Get Storage Account Name from Data Factory Linked Service

Time:07-12

I have a requirement, where I want to get the ADLS storage account name and use it in an activity. I am using Event based Trigger and I can get the container name, folder path and the file name from the trigger. But, I want the storage account name as well.

I can see that in the Linked Service JSON, it stores the storage account name in the URL. Is there any way to extract this information.

enter image description here

CodePudding user response:

Linked service JSON code is generated based on the values we provide while creating it. The storage account name from the JSON code cannot be pulled to use in your pipeline.

Instead, create a parameter in your pipeline to store the storage account name and pass the account name value from the trigger/linked service when creating it.

Pipeline parameter:

enter image description here

Passing parameter value from trigger:

enter image description here

CodePudding user response:

I could suggest you to please have a look on the API which ADF exposes .

Linked Services - Get Reference

Service: Data Factory API Version: 2018-06-01 Gets a linked service.

https://docs.microsoft.com/en-us/rest/api/datafactory/linked-services/get

  • Related