Author : MD TAREQ HASSAN | Updated : 2022/08/18
What is linked service?
- Linked services are much like connection strings, which define the connection information that’s needed for Data Factory to connect to external resources
- A linked service defines a data store or a compute service
- A linked service is defined in JSON format
- ADF runtime references (uses) linked service to:
- Connect to data store
- Dispatch activity to run on the target compute environment (i.e. Databricks/Spark Cluster)
Liked services represent connection information, specifies how to connect:
- Data source/sink to ingest or store data
- Compute resources for transformation
Types of linked services
Linked services are used for two purposes in ADF:
- To represent a data store (data source or data sink)
- To represent a compute resource that can host the execution of an activity (i.e. “mapping data flow” activity on Databricks)
So, we can say that there are two types of linked services:
Managed identity as credentials for linked services
User-assigned managed identities can be used by ADF to create linked services. For example, we can create a user-assigned managed, assign appropriate role at storage account scope and then add this managed identity to ADF so that ADF can use that managed identity to create “data store linked service”.
User-assigned managed identity as credentials:
- Create managed identity and assign role:
- Create user-assigned managed identity resource
- Assign “Contributor” role at Stoarge Account scope
- Add user-assigned managed identity to ADF
- Required Azure RBAC role:
- Users must have the Managed Identity Operator (Azure RBAC) role to configure a user assigned managed identity as a credential
- Additional RBAC is required to create and use credentials in Synapse
- ADF resource > Managed Identities
- User assigned > Add > select target user-assigned managed identity
- Required Azure RBAC role:
- Create credentials:
- ADF management hub > Credentials
- New > select user-assigned managed identity
Now, we can create a new linked service and select User-assigned managed identity under authentication.
Details: https://docs.microsoft.com/en-us/azure/data-factory/credentials