本页介绍如何使用 目标SDK中的配置选项 和其他Destination SDK功能和API参考文档中的 基于文件的目标. 这些步骤按如下顺序排列。
在前进到下述步骤之前,请阅读 Destination SDK入门 页面,以了解有关获取使用Adobe I/OAPI所需的Destination SDK身份验证凭据以及其他先决条件的信息。
首先,使用 /destinations-server
端点(读取) API参考)。
下面显示了 Amazon S3 目标。 要配置其他类型的基于文件的目标,请查看其对应的 服务器配置.
API格式
POST platform.adobe.io/data/core/activation/authoring/destination-servers
{
"name": "S3 destination",
"destinationServerType": "FILE_BASED_S3",
"fileBasedS3Destination": {
"bucket": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.bucket}}"
},
"path": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.path}}"
}
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
以下是使用 /destinations
API端点。 有关此配置的更多信息,请参阅 目标配置.
要将步骤1中的服务器和文件配置连接到此目标配置,请将服务器和模板配置的实例ID添加为 destinationServerId
这里。
API格式
POST platform.adobe.io/data/core/activation/authoring/destinations
{
"name": "Amazon S3 destination",
"description": "Amazon S3 destination is a fictional destination, used for this example.",
"releaseNotes": "Test",
"status": "Test",
"customerAuthenticationConfigurations": [
{
"authType": "S3"
}
],
"customerEncryptionConfigurations": [],
"customerDataFields": [
{
"name": "bucket",
"title": "Amazon S3 bucket name",
"description": "Enter the Amazon S3 Bucket name that will host the exported files.",
"type": "string",
"isRequired": true,
"readOnly": false,
"hidden": false
},
{
"name": "path",
"title": "Amazon S3 path",
"description": "Enter Amazon S3 folder path",
"type": "string",
"isRequired": true,
"pattern": "^[A-Za-z]+$",
"readOnly": false,
"hidden": false
},
{
"name": "compression",
"title": "Select compression type",
"description": "Select the file compression type used by the exported files.",
"type": "string",
"isRequired": true,
"readOnly": false,
"enum": [
"GZIP",
"NONE",
"bzip2",
"lz4",
"snappy",
"deflate"
]
},
{
"name": "fileType",
"title": "Select a file format",
"description": "Select the file format to be used by the exported files.",
"type": "string",
"isRequired": true,
"readOnly": false,
"hidden": false,
"enum": [
"csv",
"json",
"parquet"
],
"default": "csv"
}
],
"uiAttributes": {
"documentationLink": "https://www.adobe.io/apis/experienceplatform.html",
"category": "S3",
"iconUrl": "https://dc5tqsrhldvnl.cloudfront.net/2/90048/da276e30c730ce6cd666c8ca78360df21.png",
"connectionType": "S3",
"flowRunsSupported": true,
"monitoringSupported": true,
"frequency": "Batch"
},
"destinationDelivery": [
{
"deliveryMatchers": [
{
"type": "SOURCE",
"value": [
"batch"
]
}
],
"authenticationRule": "CUSTOMER_AUTHENTICATION",
"destinationServerId": "eec25bde-4f56-4c02-a830-9aa9ec73ee9d"
}
],
"schemaConfig": {
"profileRequired": true,
"segmentRequired": true,
"identityRequired": true
},
"batchConfig": {
"allowMandatoryFieldSelection": true,
"allowDedupeKeyFieldSelection": true,
"defaultExportMode": "DAILY_FULL_EXPORT",
"allowedExportMode": [
"DAILY_FULL_EXPORT",
"FIRST_FULL_THEN_INCREMENTAL"
],
"allowedScheduleFrequency": [
"DAILY",
"EVERY_3_HOURS",
"EVERY_6_HOURS",
"EVERY_8_HOURS",
"EVERY_12_HOURS",
"ONCE"
],
"defaultFrequency": "DAILY",
"defaultStartTime": "00:00"
},
"backfillHistoricalProfileData": true
}
对于某些目标,Destination SDK要求您配置受众元数据配置,以编程方式创建、更新或删除目标中的受众。 请参阅 受众元数据管理 有关何时需要设置此配置以及如何进行此配置的信息。
如果您使用受众元数据配置,则必须将其连接到在步骤2中创建的目标配置。 将受众元数据配置的实例ID添加到目标配置中,如 audienceTemplateId
.
取决于您是否指定 "authenticationRule": "CUSTOMER_AUTHENTICATION"
或 "authenticationRule": "PLATFORM_AUTHENTICATION"
在上述目标配置中,您可以使用 /destination
或 /credentials
端点。
如果已选择 "authenticationRule": "CUSTOMER_AUTHENTICATION"
在目标配置中,请参阅以下部分,了解基于文件的目标的Destination SDK支持的身份验证类型:
如果已选择 "authenticationRule": "PLATFORM_AUTHENTICATION"
,请参阅 身份验证配置.
使用上一步中的配置端点设置目标后,您可以使用 目标测试工具 以测试Adobe Experience Platform与您的目标之间的集成。
在测试目标的过程中,您必须使用Experience PlatformUI创建区段,然后才能将区段激活到目标。 有关如何在Experience Platform中创建区段的说明,请参阅以下两个资源:
如果您要创建供自己使用的专用目标,并且不想将其发布到目标目录中以供其他客户使用,则无需执行此步骤。
配置和测试目标后,请使用 目标发布API 将配置提交到Adobe以供审核。
如果您要创建供自己使用的专用目标,并且不想将其发布到目标目录中以供其他客户使用,则无需执行此步骤。
如果您是独立软件供应商(ISV)或系统集成商(SI),创建 产品化集成,则使用 自助文档流程 要在 Experience Platform目标目录.
如果您要创建供自己使用的专用目标,并且不想将其发布到目标目录中以供其他客户使用,则无需执行此步骤。
最后,在目标可以发布到Experience Platform目录并对所有Experience Platform客户可见之前,您需要正式提交目标以供Adobe查看。 查找有关如何 提交以供审核在Destination SDK中创作的按产品化目标.