Ultimate
Flow Service API を使用した Google BigQuery のExperience Platformへの接続
作成対象:
- 開発者
このガイドでは、Flow Service API を使用して Google BigQuery データベースをAdobe Experience Platformに接続する方法について説明します。
基本を学ぶ
このガイドは、Adobe Experience Platform の次のコンポーネントを実際に利用および理解しているユーザーを対象としています。
Experience Platform API の使用
Experience Platform API を正常に呼び出す方法について詳しくは、Experience Platform API の概要を参照してください。
必要な資格情報の収集
Google BigQuery 資格情報の取得手順について詳しくは、Google BigQuery 認証ガイドを参照してください。
Google BigQuery を Azure 上のExperience Platformに接続
Google BigQuery ソースを Azure 上のExperience Platformに接続する方法については、以下の手順を参照してください。
Azure 上のExperience Platformに Google BigQuery のベース接続を作成する
ベース接続は、ソースとExperience Platform間の情報(ソースの認証資格情報、現在の接続状況、一意のベース接続 ID など)を保持します。 ベース接続 ID により、ソース内からファイルを参照および移動し、データタイプやフォーマットに関する情報を含む、取り込みたい特定の項目を識別することができます。
ベース接続 ID を作成するには、/connections
エンドポイントに POST リクエストを実行し、Google BigQuery 認証資格情報をリクエストパラメーターの一部として使用します。
API 形式
POST /connections
リクエスト
次のリクエストは、基本認証を使用して Google BigQuery のベース接続を作成します。
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": "Google BigQuery connection with basic authentication",
"description": "Google BigQuery connection with basic authentication",
"auth": {
"specName": "Basic Authentication",
"type": "OAuth2.0",
"params": {
"project": "{PROJECT}",
"clientId": "{CLIENT_ID},
"clientSecret": "{CLIENT_SECRET}",
"refreshToken": "{REFRESH_TOKEN}"
}
},
"connectionSpec": {
"id": "3c9b37f8-13a6-43d8-bad3-b863b941fedd",
"version": "1.0"
}
}'
auth.params.project
auth.params.clientId
auth.params.clientSecret
auth.params.refreshToken
connectionSpec.id
3c9b37f8-13a6-43d8-bad3-b863b941fedd
。リクエストが成功した場合は、一意の ID(id
)を含む、新しく作成した接続の詳細が返されます。この ID は、次のチュートリアルでデータを調べるために必要です。
{
"id": "6990abad-977d-41b9-a85d-17ea8cf1c0e4",
"etag": "\"ca00acbf-0000-0200-0000-60149e1e0000\""
}
次のリクエストは、サービス認証を使用して Google BigQuery のベース接続を作成します。
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": "Google BigQuery base connection with service account",
"description": "Google BigQuery connection with service account",
"auth": {
"specName": "Service Authentication",
"params": {
"projectId": "{PROJECT_ID}",
"keyFileContent": "{KEY_FILE_CONTENT},
"largeResultsDataSetId": "{LARGE_RESULTS_DATASET_ID}"
}
},
"connectionSpec": {
"id": "3c9b37f8-13a6-43d8-bad3-b863b941fedd",
"version": "1.0"
}
}'
auth.params.projectId
auth.params.keyFileContent
auth.params.largeResultsDataSetId
リクエストが成功した場合は、一意の ID(id
)を含む、新しく作成した接続の詳細が返されます。この ID は、次のチュートリアルでデータを調べるために必要です。
{
"id": "6990abad-977d-41b9-a85d-17ea8cf1c0e4",
"etag": "\"ca00acbf-0000-0200-0000-60149e1e0000\""
}
Experience Platform on Amazon Web Services(AWS)への Google BigQuery の接続
Google BigQuery データベースをAWS上のExperience Platformに接続する方法については、以下の手順を参照してください。
AWS上のExperience Platformに Google BigQuery のベース接続を作成する
API 形式
POST /connections
リクエスト
次のリクエストは、AWS上のExperience Platformに接続するためのベース接続 Google BigQuery 作成します。
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": "Google BigQuery base connection on AWS",
"description": "Google BigQuery base connection on AWS",
"auth": {
"specName": "Service Authentication",
"params": {
"projectId": "{PROJECT_ID}",
"keyFileContent": "{KEY_FILE_CONTENT},
"datasetId": "{DATASET_ID}"
},
"connectionSpec": {
"id": "3c9b37f8-13a6-43d8-bad3-b863b941fedd",
"version": "1.0"
}
}'
auth.params.projectId
auth.params.keyFileContent
auth.params.datasetId
応答
リクエストが成功した場合は、一意の ID(id
)を含む、新しく作成した接続の詳細が返されます。この ID は、次のチュートリアルでストレージを調査するために必要になります。
{
"id": "6990abad-977d-41b9-a85d-17ea8cf1c0e4",
"etag": "\"ca00acbf-0000-0200-0000-60149e1e0000\""
}
次の手順
このチュートリアルでは、Flow Service API を使用して Google BigQuery ベース接続を作成しました。このベース接続 ID は、次のチュートリアルで使用できます。