MarkLogic-mlcp导出到单个输出文件 [英] MarkLogic - mlcp export to a single output file

查看:130
本文介绍了MarkLogic-mlcp导出到单个输出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MarkLogic 9.0-6.2版

MarkLogic version 9.0-6.2

mlcp版本9.0.6

mlcp version 9.0.6

我有一个客户集合,每个文档都有一个客户根节点,如下所示.

I have a customer collection with each document having a customer root node, as below.

<customer>
  <customerId>123</customerId>
  ....
</customer>

我需要将集合中的所有文档导出到一个新的名为customerinfo的根目录下的单个输出文件中

My need is to export all documents in the collection into one single output file under a new root called customerinfo

<customerInfo>
    <customer>
      <customerId>123</customerId>
      ....
    </customer>
    <customer>
      <customerId>456</customerId>
      ....
    </customer>
</customerInfo>

使用以下代码,我可以将集合导出为目录下的单个文档.

Using below code, I am able to export the collection as individual documents under a directory.

mlcp.sh export -ssl \
-host localhost \
-port 8010 \
-username uname \
-password pword \
-mode local \
-output_file_path /test/TestFiles/customer \
-collection_filter customer \
-output_type document

是否可以将输出汇总到一个新的根节点下的单个文档中?

Is it possible to aggregate output into one single document, under a new root node?

推荐答案

ml-gradle有一些使用MarkLogic的Data Movement SDK的任务,因此理想情况下您无需编写任何代码即可-

ml-gradle has some tasks that use MarkLogic's Data Movement SDK so that you ideally don't need to write any code to do this - https://github.com/marklogic-community/ml-gradle/wiki/Exporting-data

这篇关于MarkLogic-mlcp导出到单个输出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆