流量运行通知
Adobe Experience Platform允许从外部源摄取数据,同时允许您使用Platform服务来构建、标记和增强传入数据。 您可以从各种来源(如Adobe应用程序、基于云的存储、数据库和许多其他来源)中摄取数据。
Flow Service API用于收集和集中来自Platform内各种不同来源的客户数据。 该服务提供了一个用户界面和RESTful API,所有受支持的源均可从该API连接。
通过Adobe I/O事件,您可以订阅事件并使用Webhook接收有关流运行状态的通知。 这些通知包含有关流运行成功或导致运行失败的错误的信息。
本文档提供了有关如何订阅事件、注册Webhook以及接收包含有关流运行状态信息的通知的步骤。
快速入门
本教程假定您已经创建了至少一个要监视其流运行的源连接。 如果尚未配置源连接,请先访问源概述配置您选择的源,然后再返回本指南。
本文档还需要实际了解Webhook以及如何将Webhook从一个应用程序连接到另一个应用程序。 有关Webhook的介绍,请参阅I/O Events 文档。
注册webhook以获取流运行通知
要接收流运行通知,您必须使用Adobe Developer Console注册Experience Platform集成的webhook。
请阅读有关订阅I/O Event通知的教程,以了解有关如何完成此操作的详细步骤。
- Experience PlatformSource的流运行成功
- Experience PlatformSource流运行失败
接收流运行通知
在连接webhook并完成事件订阅后,您可以开始通过webhook仪表板接收流运行通知。
通知将返回信息,例如运行的引入作业数、文件大小和错误。 通知还会返回与以JSON格式运行的流关联的有效负载。 响应有效负载可分类为sources_flow_run_success
或sources_flow_run_failure
。
sources_flow_run_success
。 如果成功的流运行包含错误,这些错误仍将作为返回有效负载的一部分包含。成功
成功的响应返回一组metrics
,该组定义了特定流运行的特性,并返回了activities
,该组概述了如何转换数据。
{
"event_id": "aec55616-1715-487f-8044-ba648cc8ffee",
"event": {
"createdAt": 1597213529158,
"updatedAt": 1597213530760,
"createdBy": "{CREATED_BY}",
"updatedBy": "{UPDATED_BY}",
"createdClient": "{CREATED_CLIENT}",
"updatedClient": "{UPDATED_CLIENT}",
"sandboxId": "7127a4f0-def8-11e9-83ce-e79494b1c2a5",
"sandboxName": "prod",
"imsOrgId": "{ORG_ID}",
"id": "933cf9f4-cf01-4d75-bcf9-f4cf010d750a",
"flowId": "1c6f1047-dcaf-48fe-af10-47dcaf08feaf",
"providerRefId": "test1234",
"etag": "\"5100ec97-0000-0200-0000-5f338b5b0000\"",
"metrics": {
"durationSummary": {
"startedAtUTC": 1590512053,
"completedAtUTC": 1590512053
},
"sizeSummary": {
"inputBytes": 2048,
"outputBytes": 1024
},
"recordSummary": {
"inputRecordCount": 100,
"outputRecordCount": 70
},
"fileSummary": {
"inputFileCount": 10,
"outputFileCount": 10
},
"statusSummary": {
"status": "success"
}
},
"activities": [
{
"id": "copyActivity",
"updatedAtUTC": 87473822,
"durationSummary": {
"startedAtUTC": 1590512053,
"completedAtUTC": 1590512053
},
"sizeSummary": {
"inputBytes": 2048,
"outputBytes": 1098
},
"recordSummary": {
"inputRecordCount": 100,
"outputRecordCount": 100
},
"fileSummary": {
"inputFileCount": 10,
"outputFileCount": 10
},
"statusSummary": {
"status": "success",
"extensions": {
"adf/pipeline/id": "abcd",
"adf/run/id": "1234"
}
},
"sourceInfo": [
{
"id": "sourceConnectionId1",
"type": "SourceConnection",
"reference": {
"type": "AdfRunId"
}
}
]
},
{
"id": "promotionActivity",
"updatedAtUTC": 87473822,
"durationSummary": {
"completedAtUTC": 1590512053
},
"sizeSummary": {
"inputBytes": 1098,
"outputBytes": 1024
},
"recordSummary": {},
"fileSummary": {
"inputFileCount": 10,
"outputFileCount": 10,
"extensions": {
"manifest": {
"fileInfo": "https://platform.adobe.io/data/foundation/export/batches/01E4TSJNM2H5M74J0XB8MFWDHK/meta?path=input_files"
}
}
},
"statusSummary": {
"status": "success",
"extensions": {
"batchId": "b1",
"acp_request_id": "1234"
}
},
"targetInfo": [
{
"id": "targetConnectionId1",
"type": "TargetConnection",
"reference": {
"type": "batch"
}
}
]
}
],
"slaCreatedAt": 1597213531124,
"processStartTime": 1597213531213,
"header": {
"_adobeio": {
"imsOrgId": "{ORG_ID}",
"providerMetadata": "platform_notifications",
"eventCode": "sources_flow_run_success"
}
},
"transformedTime": 1597213531214
}
}
metrics
activities
durationSummary
sizeSummary
recordSummary
fileSummary
fileInfo
statusSummary
失败
以下响应是流运行失败的示例,在处理复制的数据时出现错误。 从源复制数据时也可能出错。 失败的流运行包含有关导致运行失败的错误的信息,包括其错误和说明。
[
{
"messages": [
{
"msgType": "eventNotification",
"version": "1.0",
"timestamp": 1597434157622,
"imsOrgId": "{ORG_ID}",
"schema": {
"name": "run-notification",
"version": "1.0"
},
"provider": "FlowService",
"_eventNotificationMeta": {
"category": "Platform Notifications",
"type": "sources_flow_run_failed"
},
"value": {
"createdAt": 1597434147259,
"updatedAt": 1597434157567,
"createdBy": "{CREATED_BY}",
"updatedBy": "{UPDATED_BY}",
"createdClient": "{CREATED_CLIENT}",
"updatedClient": "{UPDATED_CLIENT}",
"sandboxId": "e49ebb00-d0fa-11e9-b164-ed6a398c8b35",
"sandboxName": "prod",
"imsOrgId": "{ORG_ID}",
"id": "d9024c32-2174-4271-824c-322174627101",
"flowId": "cf4fce79-8822-456d-8fce-798822556dc6",
"etag": "\"0c003dbf-0000-0200-0000-5f36e92d0000\"",
"metrics": {
"durationSummary": {
"startedAtUTC": 1597434147190
},
"sizeSummary": {
"inputBytes": -1
},
"fileSummary": {
"inputFileCount": -1
},
"statusSummary": {
"status": "failed",
"errors": [
{
"code": "CONNECTOR-2001-500",
"message": "Error in processing (parsing, validation or transformation) the copied data."
}
]
}
},
"activities": [
{
"id": "promotionActivity",
"updatedAtUTC": 1597434157529,
"durationSummary": {
"startedAtUTC": 1597434147190,
"completedAtUTC": 1597434157212
},
"sizeSummary": {
"inputBytes": -1
},
"recordSummary": {},
"fileSummary": {
"inputFileCount": -1,
"extensions": {
"manifest": {
"fileInfo": "https://platform-stage.adobe.io/data/foundation/export/batches/6f6a900f-e40d-4f0e-9bb9-b614436c3465/meta?path=input_files"
}
}
},
"statusSummary": {
"status": "failed",
"errors": [
{
"code": "CONNECTOR-2001-500",
"message": "Error in processing (parsing, validation or transformation) the copied data."
}
],
"extensions": {
"errors": [
{
"code": "133",
"message": "We are unable to locate any files uploaded for this batch. Please upload files to ingest."
}
]
}
},
"targetInfo": [
{
"id": "e88737aa-27b8-4795-8737-aa27b8f7959e",
"type": "TargetConnection",
"reference": {
"type": "Batch",
"ids": [
"6f6a900f-e40d-4f0e-9bb9-b614436c3465"
]
}
}
]
}
]
}
}
]
}
]
fileInfo
后续步骤
您现在可以订阅事件,以便接收有关流运行状态的实时通知。 有关流运行和源的详细信息,请参阅源概述。
附录
以下各节提供了有关使用流运行通知的附加信息。
了解错误消息 errors
从源复制数据或将复制的数据处理到Platform时,可能会发生摄取错误。 有关特定错误的更多信息,请参阅下表。
CONNECTOR-1001-500
CONNECTOR-2001-500