Share via


快速入門:設定在 Azure Synapse Analytics 中使用 Azure AI 服務的必要條件

在本快速入門中,您將了解如何設定在 Azure Synapse Analytics 中安全使用 Azure AI 服務的必要條件。 連結這些 Azure AI 服務可讓您從 Synapse 中的各種體驗運用 Azure AI 服務。

本快速入門涵蓋:

  • 建立 Azure AI 服務資源,例如文字分析或異常偵測器。
  • 將 Azure AI 服務資源的驗證金鑰以祕密形式儲存在 Azure Key Vault 中,並設定 Azure Synapse Analytics 工作區的存取權。
  • 在 Azure Synapse Analytics 工作區中建立 Azure Key Vault 連結服務。
  • 在 Azure Synapse Analytics 工作區中建立 Azure AI 服務連結服務。

如果您沒有 Azure 訂用帳戶,請在開始前建立免費帳戶

必要條件

  • Azure Synapse Analytics 工作區,其中 Azure Data Lake Storage Gen2 儲存體帳戶已設定為預設儲存體。 使用 Azure Data Lake Storage Gen2 檔案系統時,您必須是該檔案系統的「儲存體 Blob 資料參與者」

登入 Azure 入口網站

登入 Azure 入口網站

建立 Azure AI 服務資源

Azure AI 服務包含許多類型的服務。 下列服務是 Azure Synapse 教學課程中所使用的範例。

您可以在 Azure 入口網站中建立文字分析資源:

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

您可以在 Azure 入口網站中建立異常偵測器資源:

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

您可以在 Azure 入口網站中建立 Azure AI 文件智慧服務資源 (適用於文件智慧服務):

Screenshot that shows Azure AI Document Intelligence in the portal, with the Create button.

您可以在 Azure 入口網站中建立翻譯工具資源:

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

您可以在 Azure 入口網站中建立電腦視覺資源:

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

您可以在 Azure 入口網站中建立臉部資源:

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

您可以在 Azure 入口網站中建立語音資源:

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

建立金鑰保存庫並設定祕密和存取權

  1. 在 Azure 入口網站中建立金鑰保存庫

  2. 移至 [Key Vault]>[存取原則],並授與 Azure Synapse 工作區 MSI 權限以讀取 Azure Key Vault 中的祕密。

    注意

    請確定已儲存原則變更。 此步驟很容易遺漏。

    Screenshot that shows selections for adding an access policy.

  3. 移至您的 Azure AI 服務資源。 例如,移至 [異常偵測器]>[金鑰和端點]。 然後將兩個金鑰的其中一個複製到剪貼簿。

  4. 移至 [Key Vault]>[祕密] 以建立新的祕密。 指定祕密的名稱,然後將上一個步驟中的金鑰貼到 [值] 欄位中。 最後,選取 [建立]

    Screenshot that shows selections for creating a secret.

    重要

    請務必記住或記下此祕密名稱。 稍後當您建立 Azure AI 服務連結服務時,將會使用此祕密。

在 Azure Synapse 中建立 Azure Key Vault 連結服務

  1. 在 Synapse Studio 中開啟您的工作區。
  2. 移至 [管理]>[連結服務]。 指向我們剛才建立的金鑰保存庫,來建立 Azure Key Vault 連結服務。
  3. 選取 [測試連接] 按鈕來驗證連線。 如果連線為綠色,請選取 [建立],然後選取 [全部發佈] 以儲存您的變更。

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

在 Azure Synapse 中建立 Azure AI 連結服務

  1. 在 Synapse Studio 中開啟您的工作區。
  2. 移至 [管理]>[連結服務]。 指向您剛才建立的 Azure AI 服務,來建立 Azure 認知服務連結服務。
  3. 選取 [測試連接] 按鈕來驗證連線。 如果連線為綠色,請選取 [建立],然後選取 [全部發佈] 以儲存您的變更。

Screenshot that shows Azure AI services as a new linked service.

您現在已準備好繼續進行在 Synapse Studio 中使用 Azure AI 服務體驗的其中一個教學課程。

下一步