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.
2
Answers
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:
Passing parameter value from trigger:
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://learn.microsoft.com/en-us/rest/api/datafactory/linked-services/get