使用流服务API监控源数据流
本教程介绍了使用Flow Service API监控流运行数据的完整性、错误和量度的步骤。
NOTE
本教程要求您具有有效数据流的ID值。 如果没有有效的数据流ID,请从源概述中选择您选择的连接器,并按照列出的步骤创建数据流,然后再尝试本教程。
快速入门
本教程还要求您实际了解Adobe Experience Platform的以下组件:
使用平台API
有关如何成功调用平台API的信息,请参阅平台API快速入门指南。
监测数据流
要查看数据流的状态,请向Flow Service API发出GET请求,同时提供数据流对应的流ID。
API格式
GET /runs?property=flowId=={FLOW_ID}
参数
描述
{FLOW_ID}
要监视的数据流的唯一
id
值。请求
以下请求检索现有数据流的规范。
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/runs?property=flowId==c9cef9cb-c934-4467-8ef9-cbc934546741' \
-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}'
响应
成功的响应将返回有关流运行的详细信息,包括其创建日期、源和目标连接的信息,以及流运行的唯一标识符(id
)。
{
"items": [
{
"createdAt": 1596656079576,
"updatedAt": 1596656113526,
"createdBy": "{CREATED_BY}",
"updatedBy": "{UPDATED_BY}",
"createdClient": "{CREATED_CLIENT}",
"updatedClient": "{UPDATED_CLIENT}",
"sandboxId": "1bd86660-c5da-11e9-93d4-6d5fc3a66a8e",
"sandboxName": "prod",
"id": "9830305a-985f-47d0-b030-5a985fd7d004",
"flowId": "c9cef9cb-c934-4467-8ef9-cbc934546741",
"etag": "\"b8003af1-0000-0200-0000-5f2b09f10000\"",
"metrics": {
"durationSummary": {
"startedAtUTC": 1596656058198,
"completedAtUTC": 1596656113306
},
"sizeSummary": {
"inputBytes": 24012,
"outputBytes": 17128
},
"recordSummary": {
"inputRecordCount": 100,
"outputRecordCount": 99,
"failedRecordCount": 1
},
"fileSummary": {
"inputFileCount": 1,
"outputFileCount": 1,
"activityRefs": [
"promotionActivity"
]
},
"statusSummary": {
"status": "success",
"errors": [
{
"code": "CONNECTOR-2001-500",
"message": "Error occurred at promotion activity."
}
],
"activityRefs": [
"promotionActivity"
]
}
},
"activities": [
{
"id": "copyActivity",
"updatedAtUTC": 1596656095088,
"durationSummary": {
"startedAtUTC": 1596656058198,
"completedAtUTC": 1596656089650,
"extensions": {
"windowStart": 1596653708000,
"windowEnd": 1596655508000
}
},
"sizeSummary": {
"inputBytes": 24012,
"outputBytes": 24012
},
"recordSummary": {},
"fileSummary": {
"inputFileCount": 1,
"outputFileCount": 1
},
"statusSummary": {
"status": "success",
"extensions": {
"type": "one-time"
}
},
"sourceInfo": [
{
"id": "c0e18602-f9ea-44f9-a186-02f9ea64f9ac",
"type": "SourceConnection",
"reference": {
"type": "AdfRunId",
"ids": [
"8a8eb0cc-e283-4605-ac70-65a5adb1baef"
]
}
}
]
},
{
"id": "promotionActivity",
"updatedAtUTC": 1596656113485,
"durationSummary": {
"startedAtUTC": 1596656095333,
"completedAtUTC": 1596656113306
},
"sizeSummary": {
"inputBytes": 24012,
"outputBytes": 17128
},
"recordSummary": {
"inputRecordCount": 100,
"outputRecordCount": 99,
"failedRecordCount": 1
},
"fileSummary": {
"inputFileCount": 2,
"outputFileCount": 1,
"extensions": {
"manifest": {
"fileInfo": "https://platform.adobe.io/data/foundation/export/batches/01EF01X41KJD82Y9ZX6ET54PCZ/meta?path=input_files"
}
}
},
"statusSummary": {
"status": "success",
"errors": [
{
"code": "CONNECTOR-2001-500",
"message": "Error occurred at promotion activity."
}
],
"extensions": {
"manifest": {
"failedRecords": "https://platform.adobe.io/data/foundation/export/batches/01EF01X41KJD82Y9ZX6ET54PCZ/meta?path=row_errors",
"sampleErrors": "https://platform.adobe.io/data/foundation/export/batches/01EF01X41KJD82Y9ZX6ET54PCZ/meta?path=row_error_samples.json"
},
"errors": [
{
"code": "INGEST-1212-400",
"message": "Encountered 1 errors in the data. Successfully ingested 99 rows. Review the associated diagnostic files for additional details."
},
{
"code": "MAPPER-3700-400",
"recordCount": 1,
"message": "Mapper Transform Error"
}
]
}
},
"targetInfo": [
{
"id": "47166b83-01c7-4b65-966b-8301c70b6562",
"type": "TargetConnection",
"reference": {
"type": "Batch",
"ids": [
"01EF01X41KJD82Y9ZX6ET54PCZ"
]
}
}
]
}
]
}
],
"_links": {}
}
属性
描述
items
包含与特定流运行关联的元数据的单个有效负载。
metrics
定义流运行中数据的特性。
activities
定义如何转换数据。
durationSummary
定义流运行的开始和结束时间。
sizeSummary
定义数据的卷(以字节为单位)。
recordSummary
定义数据的记录计数。
fileSummary
定义数据的文件计数。
statusSummary
定义流运行是成功还是失败。
后续步骤
按照本教程,您已使用Flow Service API检索有关数据流的量度和错误信息。 您现在可以继续根据摄取计划监视数据流,以跟踪其状态和摄取率。 有关如何使用用户界面执行相同任务的信息,请参阅关于使用用户界面监视数据流的教程
recommendation-more-help
337b99bb-92fb-42ae-b6b7-c7042161d089