Ultimate
Flow Service API を使用した Azure Synapse Analytics のExperience Platformへの接続
作成対象:
- 開発者
このガイドでは、Flow Service API を使用して Azure Synapse Analytics アカウントをAdobe Experience Platformに接続する方法について説明します。
基本を学ぶ
このガイドは、Adobe 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 のベース接続を作成します。
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"
}
}'
auth.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
です。応答
リクエストが成功した場合は、一意の ID (id
)を含む、新しく作成されたベース接続の詳細が返されます。
{
"id": "6bc13a3b-3546-455f-813a-3b3546a55fb1",
"etag": "\"3500866c-0000-0200-0000-5e83afa30000\""
}
次のリクエストは、サービスプリンシパルキーベースの認証を使用して、Azure Synapse Analytics のベース接続を作成します。
リクエスト
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"
}
}'
auth.params.server
auth.params.database
auth.params.tenant
auth.params.servicePrincipalId
auth.params.servicePrincipalKey
connectSpec.id
応答
リクエストが成功した場合は、一意の ID (id
)を含む、新しく作成されたベース接続の詳細が返されます。
{
"id": "6bc13a3b-3546-455f-813a-3b3546a55fb1",
"etag": "\"3500866c-0000-0200-0000-5e83afa30000\""
}
次の手順
このチュートリアルでは、Flow Service API を使用して Azure Synapse Analytics ベース接続を作成しました。このベース接続 ID は、次のチュートリアルで使用できます。