我在OSX上使用DHF 5.0.3和ML 10.0-1。
我有一个简单的流程,可以加载CSV,映射到实体然后进行母版制作。当所有三个步骤都配置了JSON时,该流程工作正常-我得到了预期的实体文档和合并的实体。当我切换到XML输出时,我得到的是实体,但没有合并的文档。所有实体文档都应用了附加的母版收集。这是一个错误还是我做错了什么?
下面的流程,CSV和实体。
谢谢, 李
ps。如果您可以将输出格式放在映射和母版制作步骤的主页上,而不是我必须进入“高级设置”,而在提取步骤上,那就太好了,因此从UI角度来看这并不协调。全世界当然不是JSON。
{
"info" : {
"title" : "Customer",
"version" : "0.0.1",
"baseUri" : "http://hlf.com/",
"description" : "Customer"
},
"definitions" : {
"Customer" : {
"required" : [ ],
"pii" : [ ],
"elementRangeIndex" : [ ],
"rangeIndex" : [ ],
"wordLexicon" : [ ],
"properties" : {
"Month" : {
"datatype" : "gYearMonth"
},
"CustomerID" : {
"datatype" : "string",
"collation" : "http://marklogic.com/collation/codepoint"
},
"BorrowerType" : {
"datatype" : "string",
"collation" : "http://marklogic.com/collation/codepoint"
},
"Nationality" : {
"datatype" : "string",
"collation" : "http://marklogic.com/collation/codepoint"
},
"DateOfBirth" : {
"datatype" : "date"
},
"AgreementNumber" : {
"datatype" : "string",
"collation" : "http://marklogic.com/collation/codepoint"
},
"RelationToAC" : {
"datatype" : "string",
"collation" : "http://marklogic.com/collation/codepoint"
}
}
}
}
}
{
"name" : "Customer",
"description" : "null",
"batchSize" : 100,
"threadCount" : 2,
"stopOnError" : false,
"options" : { },
"version" : 0,
"steps" : {
"1" : {
"name" : "IngestCustomer",
"description" : "",
"options" : {
"additionalCollections" : [ "Customer" ],
"headers" : {
"sources" : [ {
"name" : "Customer"
} ],
"createdOn" : "currentDateTime",
"createdBy" : "currentUser"
},
"sourceQuery" : "cts.collectionQuery([])",
"collections" : [ "IngestCustomer", "Customer" ],
"permissions" : "rest-reader,read,rest-writer,update",
"outputFormat" : "xml",
"targetDatabase" : "data-hub-STAGING"
},
"customHook" : { },
"retryLimit" : 0,
"batchSize" : 0,
"threadCount" : 0,
"stepDefinitionName" : "default-ingestion",
"stepDefinitionType" : "INGESTION",
"fileLocations" : {
"inputFilePath" : "/Users/leepollington/ML/HLF/data/test",
"inputFileType" : "csv",
"outputURIReplacement" : "/Users/leepollington/ML/HLF/data/test, ''",
"separator" : "|"
},
"mappingStep" : false,
"customStep" : false,
"mappingName" : null
},
"2" : {
"name" : "CustomerMapping",
"description" : "",
"options" : {
"additionalCollections" : [ ],
"sourceQuery" : "cts.collectionQuery([\"IngestCustomer\"])",
"mapping" : {
"name" : "Customer-CustomerMapping",
"version" : 20
},
"targetEntity" : "Customer",
"sourceDatabase" : "data-hub-STAGING",
"collections" : [ "CustomerMapping", "Customer" ],
"sourceCollection" : "IngestCustomer",
"outputFormat" : "xml",
"targetDatabase" : "data-hub-FINAL"
},
"customHook" : { },
"retryLimit" : null,
"batchSize" : null,
"threadCount" : null,
"stepDefinitionName" : "default-mapping",
"stepDefinitionType" : "MAPPING",
"mappingStep" : true,
"customStep" : false,
"mappingName" : "Customer-CustomerMapping"
},
"3" : {
"name" : "CustomerMastering",
"description" : "",
"options" : {
"stepUpdate" : true,
"additionalCollections" : [ "xml" ],
"sourceQuery" : "cts.collectionQuery([\"CustomerMapping\"])",
"acceptsBatch" : true,
"targetEntity" : "Customer",
"sourceDatabase" : "data-hub-FINAL",
"collections" : [ "CustomerMastering", "Customer", "xml" ],
"mergeOptions" : {
"matchOptions" : "",
"propertyDefs" : {
"properties" : [ {
"localname" : "Month",
"name" : "Month"
}, {
"localname" : "CustomerID",
"name" : "CustomerID"
}, {
"localname" : "BorrowerType",
"name" : "BorrowerType"
}, {
"localname" : "Nationality",
"name" : "Nationality"
}, {
"localname" : "DateOfBirth",
"name" : "DateOfBirth"
} ],
"namespaces" : { }
},
"algorithms" : {
"stdAlgorithm" : {
"timestamp" : { }
},
"custom" : [ ],
"collections" : {
"onMerge" : {
"add" : {
"collection" : [ "MERGED" ]
},
"remove" : {
"collection" : [ "" ]
},
"set" : {
"collection" : [ "" ]
}
}
}
},
"mergeStrategies" : [ ],
"merging" : [ {
"propertyName" : "Month",
"maxValues" : "3",
"sourceWeights" : [ ]
}, {
"propertyName" : "CustomerID",
"maxValues" : "1",
"sourceWeights" : [ ]
}, {
"propertyName" : "BorrowerType",
"maxValues" : "1",
"sourceWeights" : [ ]
}, {
"propertyName" : "Nationality",
"maxValues" : "1",
"sourceWeights" : [ ]
}, {
"propertyName" : "DateOfBirth",
"maxValues" : "1",
"sourceWeights" : [ ]
} ]
},
"matchOptions" : {
"dataFormat" : "json",
"propertyDefs" : {
"property" : [ {
"localname" : "CustomerID",
"name" : "CustomerID"
} ]
},
"algorithms" : {
"algorithm" : [ {
"name" : "double-metaphone",
"function" : "double-metaphone",
"namespace" : "http://marklogic.com/smart-mastering/algorithms",
"at" : "/com.marklogic.smart-mastering/algorithms/double-metaphone.xqy"
}, {
"name" : "thesaurus",
"function" : "thesaurus",
"namespace" : "http://marklogic.com/smart-mastering/algorithms",
"at" : "/com.marklogic.smart-mastering/algorithms/thesaurus.xqy"
}, {
"name" : "zip-match",
"function" : "zip-match",
"namespace" : "http://marklogic.com/smart-mastering/algorithms",
"at" : "/com.marklogic.smart-mastering/algorithms/zip.xqy"
}, {
"name" : "standard-reduction",
"function" : "standard-reduction"
} ]
},
"collections" : {
"content" : [ ]
},
"scoring" : {
"add" : [ {
"propertyName" : "CustomerID",
"weight" : "50"
} ],
"expand" : [ ],
"reduce" : [ ]
},
"actions" : {
"action" : [ ]
},
"thresholds" : {
"threshold" : [ {
"above" : "10",
"label" : "CMT",
"action" : "merge"
} ]
},
"tuning" : {
"maxScan" : 200
}
},
"sourceCollection" : "CustomerMapping",
"outputFormat" : "xml",
"targetDatabase" : "data-hub-FINAL"
},
"customHook" : { },
"retryLimit" : 0,
"batchSize" : 0,
"threadCount" : 0,
"stepDefinitionName" : "default-mastering",
"stepDefinitionType" : "MASTERING",
"mappingStep" : false,
"customStep" : false,
"mappingName" : null
}
}
}
Month|CustomerID|BorrowerType|Nationality|DateOfBirth
2019-04|Sxxxx00619B|000|USA|1956-02-06
2019-05|Sxxxx00619B|000|USA|1956-02-06
2019-06|Sxxxx00619B|000|USA|1956-02-06