Azure Data Factory v2 parameters for connection string - azure-data-factory

I am new to using Azure Data Factory v2 and have a few questions regarding general transforming connection strings / LinkedServices when deploying to multiple environments.
Coming from SSIS background:
we used to define connection strings as project parameters. This allowed transforming the connecting string when deploying the artifacts onto different environments.
How can I accomplish the same using Azure Data Factory v2 ?
Is there an easy way to do this ?
I was trying to set up linked services with connection strings as parameters which then could be passed along with the triggers? Is this feasible ?

This feature is now avaialble from URL below. Are you the one who requested the feature? :)
https://azure.microsoft.com/en-us/blog/parameterize-connections-to-your-data-stores-in-azure-data-factory/

Relating to SSIS (where we would use configuration files - .dtsconfig for deployment to different deployments), for ADFV2 (& ADFV1 too) we could look into the option of using ARM templates where for every different environment (dev, test & prod) to deploy the ADF solution that many deployment files(.json) could be made and script the deployments using PowerShell. It is possible to use ARM template parameters to parameterize connections to linked services and other environment specific values. Then there are ADFV2 specific PowerShell cmdlets for creation/deployment of ADFV2 pipelines.
Also you can use PowerShell to parametrize connections to linked services and other environment specific values.
With the ADFV2 UI the VSTS GIT integration is possible so is the deployment and integration. VSTS GIT integration allows to choose a feature/development branch or create a new one in the VSTS GIT repository. Once the changes are merged with the master branch it could be published to data factory using ADFV2 UI.

I ended up solving this issue with setting up an azure key vault per environment each having a connection string secret (more details here : https://learn.microsoft.com/en-us/azure/data-factory/store-credentials-in-key-vault)
- dev
- dev-azure-datafactory
- dev-key-vault
- key: db-conn-string
value: dev-db.windows.net
- qa
- qa-azure-datafactory
- qa-key-vault
- key: db-conn-string
value: qa-db.windows.net
- production
- prod-azure-datafactory
- prod-key-vault
- key: db-conn-string
value: prod-db.windows.net
In Azure Data Factory
Define an Azure Key Vault linked service
Use the azure key vault linked service while defining connection string(s) for other linked services
This approach removes any changing of parameters in the actual linked service
The connection string with azure key vault linked service can be changed as part of your azure pipeline deployment (more details here : https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment)
Each azure data factory can be given access to its azure key vault using MSI (automated it with terraform in our case)

Related

How to use Azure Data Factory, Key Vaults and ADF Private Endpoints together

I've created new ADF instance on Azure with Managed Virtual Network integration enabled.
I planned to connect to Azure Key Vault to retrieve credentials for my pipeline’s source and sink systems using Key Vault Private Endpoint. I was able to successfully create it using Azure Data Factory Studio. I have also created Azure Key Vault linked service.
However, when I try to configure another Linked Services for source and destination systems the only option available for retrieving credentials from Key Vault is AVK Linked Service. I'm not able to select related Private Endpoint anywhere (please see below screen).
Do I miss something?
Are there any additional configuration steps required? Is the scenario I've described possible at all?
Any help will be appreciated!
UPDATE: Screen comparing 2 linked services (one with managed network and private endpoint selected and another one where I'm not able to set this options up):
Managed Virtual Network integration enabled, Make sure check which region you are using unfortunately ADF managed virtual network is not supported for East Asia.
I have tried in my environment even that option is not available
So, I have gathered some information even if you create a private endpoint for Key Vault, this column is always shown as blank .it validates URL format but doesn't do any network operation
As per official document if you want to use new link service, instead of key vault try to create other database services like azure sql, azure synapse service like as below
For your Reference:
Store credentials in Azure Key Vault - Azure Data Factory | Microsoft Docs
Azure Data Factory and Key Vault - Tech Talk Corner

Grant Access to Azure Databricks using Azure Devops

I am fairly new to Azure Devops and Azure Databricks.
I have created Azure Databricks workspace using Azure Devops CI/CD Pipeline.
Now I am looking for a solution to Add Users to Azure Databricks workspace using DevOps Pipeline.
There are several methods:
Use databricks_user resource from Databricks Terraform provider - it could be as simple as example below, or you can combine it with azuread provider, and pull users from Azure Active Directory. Another advantage of Terraform provider is that you can combine it with user groups, and other things.
resource "databricks_user" "me" {
user_name = "me#example.com"
}
Use Databricks SCIM API for Users (part of general SCIM API) - creation is quite straightforward, you just need to form correct JSON as described in docs (I didn't want to copy JSON from there), and do a call with curl or something like that. Also,
There is a collection of PowerShell scripts developed by the DataThirst company, that include scripts for adding & removing users, etc. These scripts are using REST API under the hood, and could be simpler than to use REST API. Some of these tasks are also available on the DevOps marketplace.
In any case, you need to authenticate to the workspace. For automated pipelines you have two choices - service principals or managed identity associated with DevOps worker, and they should have Owner or Contributor permissions on the workspace level, or be added into workspace as admin users.
For REST API authentication of service principal is described in details in documentation, for managed identity you just get the token from internal REST API.
Databricks Terraform provider also supports both service principals and managed identity.

How to deploy/filer the respective Server base endpoint in Swagger

I have an YAML/JSON files and we have the base serve endpoint defined as seen in the below screenshot.
How do we filter only the respective base URL for specific environment
For instance:
Server: dev files should be deployed to DEV environment, Stage files should be deployed to Stage environment and so on
Note: I'm using Azure pipeline for deployment.
In your current situation, in the devops pipeline, we do not have this function/option to do this. We recommend you can try to create a New Generic service connection and use it in your different deploy steps.

Access Azure DevOps YAML variables in Blazor server app?

If I have a yaml file and I set variables which are counters, how can I access that variable from Blazor Server?
I.e. my yaml may look like this:
variables:
version.Major: '1',
version.Minor: $[counter(variables['verion.Major'], 1)]
version.Revision: $[counter(variables['verion.Minor'], 1)]
versionName: '$(version.Major).$(version.Minor).$(version.Revision)']
And I'd like to access versionName from a Blazor Server component...
You will need to burn those variables into something that is part of the blazor app. There are many options:
overwrite the assembly version
add the values to the config file
write the value into some other file
set the value as a extended property of the deployment (in an Azure web app for example)
Access Azure DevOps YAML variables in Blazor server app?
Variables are affiliated products of Azure devops. We could not directly access these azure devops-specific products without the help of REST API.
To resolve this, the ReplaceToken task from the Marketplace https://marketplace.visualstudio.com/items?itemName=qetza.replacetokens should be correct way.

Can we use different run-time in Azure Data Factory v2 (ADFv2) Copy Activity?

I have copy activity, where source is Oracle on premises connected through Self-hosted IR and destination is Microsoft Synapse connected via Azure Run-time. These run-time is defined in connections (Linked Services).
But while execution pipeline is using Self Hosted Run-time through-out and overriding the run-time of Azure Synapse. And because of that connection is failing.
Is this default behavior? Can't I run pipeline with 2 different run-time.
Thanks #wBob but I am sorry that is not true, I found the answer at Microsoft documentation.
Copying between a cloud data source and a data source in private network: if either source or sink linked service points to a self-hosted IR, the copy activity is executed on that self-hosted Integration Runtime.
Ref: https://learn.microsoft.com/en-us/azure/data-factory/concepts-integration-runtime#determining-which-ir-to-use
Integration runtimes are defined at the linked service level. So you should have a linked service definition for your Oracle database and a separate linked service definition for your Azure Synapse Analytics (formerly known as Azure SQL Data Warehouse). So you can specify different integration runtimes, eg here's an example:
NB Azure Synapse Analytics is using the Autoresolve runtime and does not need a self-hosted integration runtime (SHIR) as it is a native PaaS service. Are you getting a specific error? If so, please post details.