Quickstart: Configure prerequisites for using Cognitive Services in Azure Synapse Analytics

In this quickstart, you'll learn how set up the prerequisites for securely using Azure Cognitive Services in Azure Synapse Analytics. Linking these Azure Cognitive Services allows you to leverage Azure Cognitive Services from various experiences in Synapse.

This quickstart covers:

  • Create a Cognitive Services resource like Text Analytics or Anomaly Detector.
  • Store an authentication key to Cognitive Services resources as secrets in Azure Key Vault, and configure access for an Azure Synapse Analytics workspace.
  • Create an Azure Key Vault linked service in your Azure Synapse Analytics workspace.
  • Create an Azure Cognitive Services linked service in your Azure Synapse Analytics workspace.

If you don't have an Azure subscription, create a free account before you begin.

Prerequisites

  • Azure Synapse Analytics workspace with an Azure Data Lake Storage Gen2 storage account configured as the default storage. You need to be the Storage Blob Data Contributor of the Azure Data Lake Storage Gen2 file system that you work with.

Sign in to the Azure portal

Sign in to the Azure portal.

Create a Cognitive Services resource

Azure Cognitive Services includes many types of services. Follow services are examples used in the Azure Synapse tutorials.

You can create a Text Analytics resource in the Azure portal:

Screenshot that shows Text Analytics in the portal, with the Create button.

You can create an Anomaly Detector resource in the Azure portal:

Screenshot that shows Anomaly Detector in the portal, with the Create button.

You can create an Form Recognizer resource in the Azure portal:

Screenshot that shows Form Recognizer in the portal, with the Create button.

You can create a Translator resource in the Azure portal:

Screenshot that shows Translator in the portal, with the Create button.

You can create a Computer Vision resource in the Azure portal:

Screenshot that shows Computer Vision in the portal, with the Create button.

You can create a Face resource in the Azure portal:

Screenshot that shows Face in the portal, with the Create button.

You can create a Speech resource in the Azure portal:

Screenshot that shows Speech in the portal, with the Create button.

Create a key vault and configure secrets and access

  1. Create a key vault in the Azure portal.

  2. Go to Key Vault > Access policies, and grant the Azure Synapse workspace MSI permissions to read secrets from Azure Key Vault.

    Note

    Make sure that the policy changes are saved. This step is easy to miss.

    Screenshot that shows selections for adding an access policy.

  3. Go to your Cognitive Services resource. For example, go to Anomaly Detector > Keys and Endpoint. Then copy either of the two keys to the clipboard.

  4. Go to Key Vault > Secret to create a new secret. Specify the name of the secret, and then paste the key from the previous step into the Value field. Finally, select Create.

    Screenshot that shows selections for creating a secret.

    Important

    Make sure you remember or note down this secret name. You'll use it later when you create the Azure Cognitive Services linked service.

Create an Azure Key Vault linked service in Azure Synapse

  1. Open your workspace in Synapse Studio.
  2. Go to Manage > Linked Services. Create an Azure Key Vault linked service by pointing to the key vault that you just created.
  3. Verify the connection by selecting the Test connection button. If the connection is green, select Create and then select Publish all to save your change.

Screenshot that shows Azure Key Vault as a new linked service.

Create an Azure Cognitive Service linked service in Azure Synapse

  1. Open your workspace in Synapse Studio.
  2. Go to Manage > Linked Services. Create an Azure Cognitive Services linked service by pointing to the Cognitive Service that you just created.
  3. Verify the connection by selecting the Test connection button. If the connection is green, select Create and then select Publish all to save your change.

Screenshot that shows Azure Cognitive Service as a new linked service.

You're now ready to continue with one of the tutorials for using the Azure Cognitive Services experience in Synapse Studio.

Next steps