使用Flow Service API浏览数据表
最近更新: 2025年4月4日
创建对象:
- 开发人员
本教程提供了有关如何使用Flow Service API浏览和预览数据表结构和内容的步骤。
快速入门
本指南要求您对 Adobe Experience Platform 的以下组件有一定了解:
使用Experience Platform API
有关如何成功调用Experience Platform API的信息,请参阅Experience Platform API快速入门指南。
浏览您的数据表
您可以在提供源的基本连接ID的同时向Flow Service API发出GET请求,以检索有关数据表结构的信息。
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}'
响应
成功的响应会从源中返回表数组。 查找要带入Experience 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执行GET请求。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}
参数
描述
{BASE_CONNECTION_ID}
源的基本连接ID。
{TABLE_PATH}
要检查的表的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"
}
}
]
}
}
337b99bb-92fb-42ae-b6b7-c7042161d089