本教學課程提供如何探索和預覽資料表的結構和內容的步驟,使用 Flow Service API。
本指南需要妥善了解下列Adobe Experience Platform元件:
如需如何成功呼叫Platform API的詳細資訊,請參閱 Platform API快速入門.
您可以向 Flow Service API,同時提供來源的基本連線ID。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=root
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
源的基本連接ID。 |
要求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/5e73e5a2-dc36-45a8-9f16-93c7a43af318/explore?objectType=root' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
回應
成功的響應從源返回表陣列。 找出您要帶入Platform的表格,並注意其 path
屬性,因為您必須在下一個步驟中提供屬性,以檢查其結構。
[
{
"type": "table",
"name": "ACME Spring Campaign",
"path": "acmeSpringCampaign",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "ACME Summer Campaign",
"path": "acmeSummerCampaign",
"canPreview": true,
"canFetchSchema": true
}
]
若要檢查資料表的內容,請向 Flow Service API,同時將表的路徑指定為查詢參數。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
源的基本連接ID。 |
{TABLE_PATH} |
要檢查的表的路徑屬性。 |
要求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/5e73e5a2-dc36-45a8-9f16-93c7a43af318/explore?objectType=table&object=acmeSpringCampaign' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-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"
}
},
{
"name": "Datefield",
"type": "string",
"meta:xdmType": "date-time",
"xdm": {
"type": "string",
"format": "date-time"
}
},
{
"name": "complaint_type",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "complaint_description",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "status",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "status_change_date",
"type": "string",
"meta:xdmType": "date-time",
"xdm": {
"type": "string",
"format": "date-time"
}
},
{
"name": "city",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Datefield2",
"type": "string",
"meta:xdmType": "date-time",
"xdm": {
"type": "string",
"format": "date-time"
}
}
]
}
}
依照本教學課程,您已收集資料表格的結構和內容的相關資訊。 此外,您已擷取要內嵌至Platform的表格路徑。 您可以使用此資訊建立源連接和資料流,將資料帶入Platform。 有關如何使用建立源連接和資料流的具體步驟,請參閱以下教程 Flow Service API: