本页介绍如何使用中的信息 目标SDK中的配置选项 和其他Destination SDK功能和API参考文档中的内容,以配置 基于文件的目标. 步骤按以下顺序排列。
在继续执行以下步骤之前,请阅读 Destination SDK快速入门 页面,以了解有关获取使用Destination SDKAPI所需的Adobe I/O身份验证凭据和其他先决条件的信息。
开始方式 创建服务器和文件配置 使用 /destinations-server
端点。
下面显示的是的示例配置 Amazon S3 目标。 要配置其他类型的基于文件的目标,请参阅相应的 服务器配置.
API格式
POST platform.adobe.io/data/core/activation/authoring/destination-servers
{
"name": "S3 destination",
"destinationServerType": "FILE_BASED_S3",
"fileBasedS3Destination": {
"bucketName": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.bucketName}}"
},
"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.",
"status": "Test",
"customerAuthenticationConfigurations": [
{
"authType": "S3"
}
],
"customerEncryptionConfigurations": [],
"customerDataFields": [
{
"name": "bucketName",
"title": "Amazon S3 bucket name",
"description": "Enter the Amazon S3 Bucket name that will host the exported files.",
"type": "string",
"isRequired": true,
"pattern": "(?=^.{3,63}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$)",
"readOnly": false,
"hidden": false
},
{
"name": "path",
"title": "Amazon S3 path",
"description": "Enter Amazon S3 folder path",
"type": "string",
"isRequired": true,
"pattern": "^[0-9a-zA-Z\\/\\!\\-_\\.\\*\\''\\(\\)]*((\\%SEGMENT_(NAME|ID)\\%)?\\/?)+$",
"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",
"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
.
{
"name": "Amazon S3 destination",
"description": "Amazon S3 destination is a fictional destination, used for this example.",
"status": "Test",
"customerAuthenticationConfigurations": [
{
"authType": "S3"
}
],
"customerEncryptionConfigurations": [],
"customerDataFields": [
{
"name": "bucketName",
"title": "Amazon S3 bucket name",
"description": "Enter the Amazon S3 Bucket name that will host the exported files.",
"type": "string",
"isRequired": true,
"pattern": "(?=^.{3,63}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$)",
"readOnly": false,
"hidden": false
},
{
"name": "path",
"title": "Amazon S3 path",
"description": "Enter Amazon S3 folder path",
"type": "string",
"isRequired": true,
"pattern": "^[0-9a-zA-Z\\/\\!\\-_\\.\\*\\''\\(\\)]*((\\%SEGMENT_(NAME|ID)\\%)?\\/?)+$",
"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",
"connectionType": "S3",
"flowRunsSupported": true,
"monitoringSupported": true,
"frequency": "Batch"
},
"destinationDelivery": [
{
"deliveryMatchers": [
{
"type": "SOURCE",
"value": [
"batch"
]
}
],
"authenticationRule": "CUSTOMER_AUTHENTICATION",
"destinationServerId": "eec25bde-4f56-4c02-a830-9aa9ec73ee9d"
}
],
"audienceMetadataConfig":{
"mapExperiencePlatformSegmentName":false,
"mapExperiencePlatformSegmentId":false,
"mapUserInput":false,
"audienceTemplateId":"cbf90a70-96b4-437b-86be-522fbdaabe9c"
},
"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
}
取决于您是否指定 "authenticationRule": "CUSTOMER_AUTHENTICATION"
或 "authenticationRule": "PLATFORM_AUTHENTICATION"
在上面的目标配置中,您可以使用来设置目标的身份验证 /destination
或 /credentials
端点。
如果您选择 "authenticationRule": "CUSTOMER_AUTHENTICATION"
在目标配置中,请参阅以下部分,了解Destination SDK支持的基于文件的目标身份验证类型:
如果您选择 "authenticationRule": "PLATFORM_AUTHENTICATION"
,请参阅 凭据配置API文档.
使用前面步骤中的配置端点设置目标后,您可以使用 目标测试工具 测试Adobe Experience Platform与您的目标之间的集成。
在测试目标的过程中,您必须使用Experience PlatformUI创建区段,并将区段激活到目标。 有关如何在Experience Platform中创建受众的说明,请参阅以下两个资源:
如果您正在创建供自己使用的专用目标,并且不想将其发布到目标目录以供其他客户使用,则不需要执行此步骤。
配置和测试目标后,使用 目标发布API 将您的配置提交给Adobe进行审核。
如果您正在创建供自己使用的专用目标,并且不想将其发布到目标目录以供其他客户使用,则不需要执行此步骤。
如果您是独立软件供应商(ISV)或系统集成商(SI),请创建 产品化集成,使用 自助式文档流程 在中为您的目标创建产品文档页面 Experience Platform目标目录.
如果您正在创建供自己使用的专用目标,并且不想将其发布到目标目录以供其他客户使用,则不需要执行此步骤。
最后,在Experience Platform目录中发布目标并对所有Experience Platform客户可见之前,您需要正式提交目标以供Adobe审查。 查找有关如何执行操作的完整信息 提交供审查在Destination SDK中创作的产品化目的地.