当我通过 MLCP 摄取文档时,我正在尝试实现信封模式
我的转换模块是这样的:
function envelope(content, context)
{
var transformed ={};
transformed.Metadata = { "Created" : "Time"};
transformed.Source = content.value;
content.uri = fn.concat("/transformed/",content.uri);
content.value = transformed;
};
exports.transform = envelope;
我的 MLCP 命令是这样的
mlcp.bat import -host localhost -port 8000 -username admin -
password admin -mode local -input_file_path D:\Marklogic\abcd.csv -input_file_ty
pe delimited_text -document_type json -transform_module /example/
mlcp-transform.sjs -transform_function transform -output_collections transformed -ge
nerate_uri true
MLCP 错误:
18/01/31 09:00:27 WARN contentpump.TransformWriter: Failed document /D:/Marklogi
c/test.pcr-0-9
18/01/31 09:00:27 WARN contentpump.TransformWriter: TypeError: Cannot read prope
rty 'uri' of undefined
18/01/31 09:00:27 WARN contentpump.TransformWriter: TypeError: Cannot read prope
rty 'uri' of undefined
我不知道为什么它无法uri
在我的转换模块中读取。任何帮助表示赞赏
谢谢