[Ultimate]{class="badge positive"}

使用Flow Service API将Azure Synapse Analytics连接到Experience Platform

IMPORTANT
Azure Synapse Analytics源在源目录中可供已购买Real-Time Customer Data Platform Ultimate的用户使用。

阅读本指南,了解如何使用Flow Service API将您的Azure Synapse Analytics帐户连接到Adobe Experience Platform。

快速入门

本指南要求您对Experience Platform的以下组件有一定的了解:

  • : Experience Platform允许从各种源摄取数据,同时让您能够使用Experience Platform服务来构建、标记和增强传入数据。
  • 沙盒: Experience Platform提供了将单个Experience Platform实例划分为多个单独的虚拟环境的虚拟沙盒,以帮助开发和改进数字体验应用程序。

以下部分提供使用Flow Service API成功连接到Azure Synapse Analytics所需了解的其他信息。

收集所需的凭据

有关身份验证的信息,请阅读Azure Synapse Analytics 概述

使用Experience Platform API

有关如何成功调用Experience Platform API的信息,请参阅Experience Platform API快速入门指南。

将Azure Synapse Analytics连接到Experience Platform

请阅读以下内容,了解如何创建基本连接并将Azure Synapse Analytics帐户连接到Experience Platform。

创建基本连接

基本连接 ​存储将源系统链接到Adobe Experience Platform的密钥信息。 这包括:

  • 您来源的身份验证凭据
  • 连接的当前状态
  • 唯一的​ 基本连接ID

基本连接ID ​允许您浏览和浏览源中的文件,帮助您识别要摄取的项及其数据类型和格式。

要创建基本连接ID,请向/connections端点发送POST请求,包括请求参数中的Azure Synapse Analytics身份验证凭据。

API格式

POST /connections
基于连接字符串的身份验证

请求

以下请求使用基于连接字符串的身份验证为Azure Synapse Analytics创建基本连接。

accordion
查看示例请求
code language-shell
curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/connections' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}' \
  -H 'Content-Type: application/json' \
  -d '{
      "name": "Connection for Azure Synapse Analytics",
      "description": "Connection for Azure Synapse Analytics",
      "auth": {
          "specName": "Connection String Based Authentication",
          "params": {
              "connectionString": "Server=tcp:{SERVER_NAME}.database.windows.net,1433;Database={DATABASE};User ID={USERNAME}@{SERVER_NAME};Password={PASSWORD};Trusted_Connection=False;Encrypt=True;Connection Timeout=30"
          }
      },
      "connectionSpec": {
          "id": "a49bcc7d-8038-43af-b1e4-5a7a089a7d79",
          "version": "1.0"
      }
  }'
table 0-row-2 1-row-2 2-row-2
参数 描述
auth.params.connectionString 用于连接到Azure Synapse Analytics的连接字符串。 Azure Synapse Analytics连接字符串模式为Server=tcp:{SERVER_NAME}.database.windows.net,1433;Database={DATABASE};User ID={USERNAME}@{SERVER_NAME};Password={PASSWORD};Trusted_Connection=False;Encrypt=True;Connection Timeout=30
connectionSpec.id Azure Synapse Analytics连接规范ID为: a49bcc7d-8038-43af-b1e4-5a7a089a7d79

响应

成功的响应返回新创建的基本连接的详细信息,包括其唯一标识符(id)。

accordion
查看示例响应
code language-json
{
    "id": "6bc13a3b-3546-455f-813a-3b3546a55fb1",
    "etag": "\"3500866c-0000-0200-0000-5e83afa30000\""
}
基于服务主体密钥的身份验证

以下请求使用基于服务主体密钥的身份验证为Azure Synapse Analytics创建基本连接。

请求

accordion
查看示例请求
code language-shell
curl -X POST \
  'https://platform.adobe.io/data/foundation/flowservice/connections' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Connection for Azure Synapse Analytics",
    "description": "Connection for Azure Synapse Analytics",
    "auth": {
      "specName": "Service Principal Key Based Authentication",
      "params": {
        "server": "yourworkspace.sql.azuresynapse.net",
        "database": "SalesDW",
        "tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47",
        "servicePrincipalId": "e7b8c1f2-1234-4c9a-9f3e-abcdef123456",
        "servicePrincipalKey": "~XyZ1234abcDEF5678..."
      }
    },
    "connectionSpec": {
      "id": "a49bcc7d-8038-43af-b1e4-5a7a089a7d79",
      "version": "1.0"
    }
  }'
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2
凭据 描述
auth.params.server Azure Synapse Analytics SQL端点的完全限定域名。
auth.params.database Azure Synapse Analytics工作区中特定数据库的名称。
auth.params.tenant 与您的Azure订阅关联的Azure Active Directory租户ID。
auth.params.servicePrincipalId Azure Active Directory应用程序的客户端ID。
auth.params.servicePrincipalKey 与服务主体关联的客户端密钥或密码。
connectSpec.id 连接规范ID Azure Synapse Analytics。

响应

成功的响应返回新创建的基本连接的详细信息,包括其唯一标识符(id)。

accordion
查看示例响应
code language-json
{
    "id": "6bc13a3b-3546-455f-813a-3b3546a55fb1",
    "etag": "\"3500866c-0000-0200-0000-5e83afa30000\""
}

后续步骤

通过完成本教程,您已使用Flow Service API创建了Azure Synapse Analytics基本连接。 您可以在下列教程中使用此基本连接ID:

recommendation-more-help
337b99bb-92fb-42ae-b6b7-c7042161d089