Sunday, March 6, 2022

How to authenticate Azure Storage Account using Key Vault in Azure Data Factory

 How to authenticate Azure Storage Account using Key Vault in Azure Data Factory

Open the portal blade for your storage account 🡪 Select Access keys

To copy key values, you must first click Show keys 🡪 Copy the Connection string value for key1

Open key vault 🡪 Secrets 🡪 Generate/Import

Paste the contents of the clipboard into the Value field, then enter a Name for the secret and create.

Grant Access to the Key Vault

Your data factory cannot use the secrets stored in your key vault until you grant it permission to do so. The data factory instance has an associated managed identity – a managed application registered in Azure Active Directory – which was created automatically when you created the data factory. You must grant access to this identity.

key vault and select Access policies

On the Access policies blade, locate and click the + Add Access Policy button

select Get and List from the Secret permissions

Under Select principal, click None selected

This opens the security principal selection blade

At the top of the blade is a search input field. An ADF managed identity service principal has the same name as the ADF instance it represents – enter the name of your data factory to search for the service principal. The search will return one matching item, as shown in the below figure. Click the item to choose it, then click the Select button at the bottom of the blade.

Create a Key Vault ADF Linked Service

Azure Data Factory accesses a key vault in exactly the same way it does other types of external resource: using a linked service. To refer to a key vault from within your data factory, you must create a linked service to represent it.

add a new linked service

then search for and select the Azure Key Vault data store. Click Continue

On the New linked service (Azure Key Vault) blade, provide a Name for the key vault linked service, then select your key vault from the Azure key vault name dropdown

Use the Test connection button to check the linked service configuration, and when successful, click Create


Create a New Storage Account Linked Service

create another new linked service, this time using the Azure Blob Storage data store

Ensure that Authentication method is set to “Account key,” then use the toggle below that field to change the connection type from “Connection string” to “Azure Key Vault.”

Select your key vault linked service from the AKV linked service dropdown, then enter the name of your storage account connection string secret.

Use the Test connection button to check the linked service configuration, and when successful, click Save.

The new linked service obtains credentials from the key vault at runtime, by obtaining the value of your named secret, authorized using the ADF instance’s managed identity


Cheers!
Uma

Tuesday, March 1, 2022

How to set up code repository for Azure Data Factory using Azure DevOps

First, if you don’t have an Azure DevOps account signup for free. Make sure you select the Default directory.

Create an organization and a project.

Organization - UmaAzure01
Project – azure_adf

Create a new Repository – Imagine a Repository is like a Parent Folder

 

Now go to Azure Data Factory and click on Set up code repository.

Here Collaboration branch means – the Final Code of the application. Usually, the main branch is set as a collaboration branch which is called as Main/Master Branch.

You can create multiple branches which are called a Feature Branch.

Branches will be merged with the master branch through Pull Request. The pull request is for approval for merging with the master.

Create a new working branch or you can use the main. In here ad_dev_branch1

Let’s create a pipeline and test. Create a pipeline under adf_dev_branch1 and saved it.

You can log in to the repository and create the Pull Request to merge

adf_dev_branch1 🡪 main

Approve the Pull Request and click on the complete button.


Once you the is completed, you can see changes in Main Branch in ADF

Cheers!
Uma

Tuesday, February 1, 2022

Power BI Premium Deployment Pipelines

The deployment pipelines tool enables BI creators to manage the life-cycle of organizational content. The deployment process lets you clone content from one stage in the pipeline to another, typically from development to test, and from test to production. The separate dataset refresh is required because data isn't copied from one stage to another.

Power BI also applies the configured deployment rules to the updated content in the target stage.

The tool is designed as a pipeline with three stages:
  • Development: This stage is used to design, build, and upload new content with fellow creators. This is the first stage in deployment pipelines.

  • Test: You're ready to enter the test stage after you've made all the needed changes to your content. You upload the modified content, so it can be moved to this test stage. Here are three examples of what can be done in the test environment
    - Share content with testers and reviewers
    - Load and run tests with larger volumes of data
    - Test your app to see how it will look for your end users

  • Production: After testing the content, use the production stage to share the final version of your content with business users across the organization.
Let’s see how to create a pipeline. A pipeline is created for a workspace, in this case Development Team is a workspace name with premium capacity.

It creates 3 workspaces for each stage, by default the naming convention will same as below.

If you need a custom name, you can rename these workspaces under Workspace Settings


When you deploy a content to this workspace, this will deploy to the stage based on your settings that you define when you crated the pipeline. In here it deployed in Development stage as shown below. In this case Development Team workspace, which is development stage.

There are two ways to deploy the content from one stage to the next one. You can deploy all the content or you can select which content items to deploy.

You can select which content items to deploy

You can also deploy content backwards, from a later stage in the deployment pipeline, to an earlier one. Deploying to a previous stage works only if the previous stage is empty. When deploying to a previous stage, you can't select specific items. All content in the stage will be deployed.

Once you delete the previous content in Test, you will see the Deploy to previous stage option available.


Auto-binding

When you use selective deploy to deploy Power BI items, deployment pipelines checks for dependencies. The deployment will either succeed or fail, depending on the location of the item that provides the data that the deployed item relies on.

  • Linked item exists in the target stage - Deployment pipelines will automatically bind the deployed item, to the item it relies on in the deployed stage. For example, if you deploy a paginated report from development to test, and it's connected to a Power BI dataset that was previously deployed to the test stage, it will be automatically connected to that database.

  • Linked item doesn't exist in the target stage - Deployment pipelines will fail a deployment if an item has a dependency on another item, and the item providing the data isn't deployed and doesn't reside in the target stage. For example, if you deploy a report from development to test, and the test stage doesn't contain its Power BI dataset, the deployment will fail. To avoid failed deployments due to dependent items not being deployed, use the Select related button. Select related automatically selects all the related items that provide dependencies to the items you're about to deploy.

Auto-binding works only with Power BI items that are supported by deployment pipelines and reside within Power BI. To view the dependencies of a Power BI item, from the item's More options menu, select View lineage.

Create deployment rules

There are two types of deployment rules:

  • Dataset rules - Defined on data sources and parameters, in each dataset. These rules determine the values of the data sources or parameters for a specific dataset. For example, if you want a dataset in a production stage to point to a production database, you can define a rule for this. The rule is defined in the production stage, under the appropriate dataset. Once the rule is defined, content deployed from test to production, will inherit the value as defined in the deployment rule, and will always apply as long as the rule is unchanged and valid.

  • Paginated reports - Defined for the data sources of each paginated report. You can use these rules to determine the data sources of the paginated report.

After modifying the report

To allow a quick visual insight into the differences between two sequential stages, a comparison icon indicator appears between them. The comparison indicator has two states:

  • Green indicator – The metadata for each content item in both stages, is the same.

  • Orange indicator - Appears if one of these conditions is met:

Some of the content items in each stage, were changed or updated (have different metadata).

There is a difference in the number of items between the stages.

Let’s do a modification one of the reports

When two sequential stages aren't the same, a compare link appears underneath the orange comparison icon. Clicking the link opens the content item list in both stages in Compare view. Compare view helps you track changes or differences between items, in each pipeline stage. Changed items get one of the following labels:

  • New – A new item in the source stage. This is an item that doesn't exist in the target stage. After deployment, this item will be cloned to the target stage.

  • Different – An item that exists both in the source and the target stage, were one of the versions was changed after the last deployment. After deployment, the item in the source stage will overwrite the item in the target stage, regardless of where the change was made.

Datasets with configured deployment rules that haven't been deployed, are also marked as different. This is because deployment rules are not applied until the datasets are deployed from the source stage to the target stage, which includes the configured rules.

  • Missing from – This label indicates that an item appears in the target stage, but not in the source stage.

To delete a pipeline first delete all the content and then delete deployment pipeline

This won’t delete Workspaces, you must delete manually

 

Pipeline Permission

Users with pipeline access have the following permissions:

  • View the pipeline

  • Share the pipeline with others

  • Edit and delete the pipeline

Pipeline access doesn't grant permissions to view or take actions on the workspace content.

Cheers!
Uma