使用Flow Service API探索資料庫
最後更新: 2025年7月28日
建立對象:
- 開發人員
此教學課程使用Flow Service API來探索協力廠商資料庫的內容和檔案結構。
快速入門
本指南需要您深入了解下列 Adobe Experience Platform 元件:
下列章節提供您需瞭解的其他資訊,才能使用Flow Service API成功連線至協力廠商資料庫。
使用Experience Platform API
如需如何成功呼叫Experience Platform API的詳細資訊,請參閱Experience Platform API快速入門指南。
探索您的資料表
使用資料庫的連線ID,您可以執行GET請求來探索資料表格。 使用以下呼叫來尋找您要檢查或擷取至Experience Platform的表格路徑。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=root
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} | 資料庫來源的連線ID。 |
要求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/6990abad-977d-41b9-a85d-17ea8cf1c0e4/explore?objectType=root' \
-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}'
回應
成功的回應會從資料庫傳回資料表陣列。 尋找您要帶入Experience Platform的表格並記下其path
屬性,因為您必須在下一個步驟中提供它以檢查其結構。
[
{
"type": "table",
"name": "test1.Mytable",
"path": "test1.Mytable",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "test1.austin_demo",
"path": "test1.austin_demo",
"canPreview": true,
"canFetchSchema": true
}
]
檢查表格的結構
若要從資料庫檢查表格結構,請在將表格路徑指定為查詢引數時執行GET要求。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} | 資料庫連線的識別碼。 |
{TABLE_PATH} | 表格的路徑。 |
要求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/6990abad-977d-41b9-a85d-17ea8cf1c0e4/explore?objectType=table&object=test1.Mytable' \
-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}'
回應
成功的回應會傳回指定資料表的結構。 有關每個資料表資料行的詳細資料位於columns
陣列的元素中。
{
"format": "flat",
"schema": {
"columns": [
{
"name": "TestID",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Name",
"type": "string",
"xdm": {
"type": "string"
}
}
]
},
"data": [],
"cdcMetadata": {
"columnDetected": true
}
}
後續步驟
按照本教學課程,您已探索您的資料庫、找到您要擷取至Experience Platform的表格路徑,並取得有關其結構的資訊。 您可以在下一個教學課程中使用此資訊,從資料庫收集資料並將其帶入Experience Platform。
recommendation-more-help
337b99bb-92fb-42ae-b6b7-c7042161d089