If you are building an Azure Data Factory (ADF) pipeline and receive an error that contains this message when your pipeline is executed:
Failed to detect region of linked service
or
Failed to detect the region for
… then you may be running into a situation where the Data Movement Service (DMS) feature of ADF is either not able to detect the region of the data store or there is no DMS in that region.
The Data Movement Service of ADF is the Azure-managed cloud service (PaaS) that performs scale-out data movement at elastic scale. Azure handles all of the plumbing for moving Big Data for your data pipelines. You can see the locations available for Data Movement on the Azure Regions page (https://azure.microsoft.com/en-us/regions/services/). On the screenshot of that page below you’ll see that the Data Factory service has several sub-services. The Data Factory service stores your factory account metadata while the Movement, Activity Dispatch and SSIS IR are separate managed services that have their own region deployments. It is the Data Movement service in those regions that perform the heavy lifting of moving your data and that is where you should focus to bypass the error.
In the V1 original ADF service, there is a property on the Linked Services definition that allows you to explicitly tell ADF the location of your data store (executionLocation). This is taken directly from the online Azure documentation for ADF (https://docs.microsoft.com/en-us/azure/data-factory/v1/data-factory-data-movement-activities#global):
For example, to copy between Azure stores in Korea, you can specify "executionLocation": "Japan East"
to route through Japan region (see sample JSON as reference).
Note
If the region of the destination data store is not in preceding list or undetectable, by default Copy Activity fails instead of going through an alternative region, unless executionLocation
is specified. The supported region list will be expanded over time.
In the new V2 ADF service, the Integration Runtime (IR) feature is the primary way to move data in the cloud or on-prem. So, you may have to explicitly tell ADF about the location of your data source by creating an IR in your data store region and then reference that IR in your Linked Services definition using the new “connectVia” property. If you do not specify an explicit IR reference, then ADF will use a “default IR” which may not be able to resolve the location.
First, create an Integration Runtime in the region where your data store is located:
https://docs.microsoft.com/en-us/azure/data-factory/create-azure-integration-runtime#create-azure-ir
Then add the
connectVia
property to your Linked Service using a reference to that new IR:
In the ADF browser UI, you set the LinkedService “connectVia” property by selecting an associated Integration Runtime: