Path: blob/master/tutorials-and-examples/how-tos/Configurate Azure ML and Azure Synapse Analytics.ipynb
3253 views
Azure Synapse - Configure Azure ML and Azure Synapse Analytics
Notebook Version: 1.0
Python Version: Python 3.8 - AzureML
Required Packages: No
Platforms Supported: Azure Machine Learning Notebooks, Spark Version 3.1
Data Source Required: No
Description
This notebook provides step-by-step instructions to set up Azure ML and Azure Synapse Analytics environment for your big data analytics scenarios that leverage Azure Synapse Spark engine. It covers:
Configuring your Azure Synapse workspace, creating a new Azure Synapse Spark pool, configuring your Azure Machine Learning workspace, and creating a new link service to link Azure Synapse with Azure Machine Learning workspace. Additionally, the notebook provides the steps to export your data from a Log Analytics workspace to an Azure Data Lake Storage gen2 that you can use for big data analytics.
*** Python modules download may be needed. ***
*** Please run the cells sequentially to avoid errors. Please do not use "run all cells". ***
Table of Contents
Warm-up
Authentication to Azure Resources
Configure Azure Synapse Workspace
Configure Azure Synapse Spark Pool
Configure Azure ML Workspace and Linked Services
Export Data from Azure Log Analytics to Azure Data Lake Storage Gen2
Bonus
1. Warm-up
2. Authentication to Azure Resources
3. Configure Azure Synapse Workspace
In this section, you first select an Azure resource group, then select an Azure Synapse workspace.
4. Configure Azure Synapse Spark Pool
In this section, you will create an Spark pool if you don't have one yet.
Enter a pool name, the rule for naming: must contain letters or numbers only and no special characters, must be 15 or less characters, must start with a letter, not contain reserved words, and be unique in the workspace.
Create the pool
List Spark pools for the Azure Synapse workspace
Run the cell below to select a Spark pool that you want to use from the Spark pool list.
5. Configure Azure ML Workspace and Linked Services
In this section, you will create a linked service, to link the selected Azure ML workspace to the selected Azure Synapse workspace, you need to be an owner of the selected Synapse workspace to proceed. You then can attached a Spark pool to the linked service.
Select Azure resource group for Azure ML
Select Azure ML workspace
Get existing linked services for selected Azure ML workspace
Enter a linked service name
Create the linked service
Enter a Synapse compute name
Attach the Spark pool to the linked service
** EXECUTE THE FOLLOWING CELL ONLY WHEN YOU WANT TO: Create a new AML - Synapse linked service! **
** Owner role of the Synapse workspace is required to create a linked service. **
** EXECUTE THE FOLLOWING CELL ONLY WHEN YOU WANT TO: Attach the selected Spark pool to the newly created linked service! **
6. Export Data from Azure Log Analytics to Azure Data Lake Storage Gen2
In this section, you can export Microsoft Sentinel data in Log Analytics to a selected ADLS Gen2 storage.
Authenticate to Log Analytics
Select Log Analytics tables, no more than 10 tables. This step may take a few minutes.
List existing Azure storages accounts in the selected Synapse workspace
Set target ADLS Gen2 storage as the data export destination
List all existing data export rules in the storage account
Enter data export rule name
Create a new data export rule
In the following step, you may select no more than 10 tables for data export. This process may take a few minutes, please be patient.
** EXECUTE THE FOLLOWING CELL ONLY WHEN YOU WANT TO: Export data tables from Log Analytics to the selected Azure Data Lake Storage Gen 2! **
Bonus
These are optional steps.
** EXECUTE THE FOLLOWING CELL ONLY WHEN YOU WANT TO: Delete a data export rule by name! **