mlcp

Using Transform Module during MLCP Ingestion to MarkLogic

左心房为你撑大大i 提交于 2020-01-30 03:06:37
问题 I am trying to implement envelope pattern when i am ingesting documents through MLCP My transform Module is like this : 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; My MLCP Command is like this mlcp.bat import -host localhost -port 8000 -username admin - password admin -mode local

how to set multiple permission in MLCP -option_permissions

て烟熏妆下的殇ゞ 提交于 2020-01-24 13:21:11
问题 I use MLCP IMPORT option parameter for permissions. But I getting an error at permissions. If I put "read" it works. However MLCP doesn't work if I combine "(read,update)". Please give me some hints. Thanks in advance. -output_permissions "bib-read-role, (read,update),bib-insert-permission, update" 回答1: You use it like this: -output_permissions "bib-read-role,read,bib-read-role,update,bib-insert-permission,update" HTH! 来源: https://stackoverflow.com/questions/46057571/how-to-set-multiple

MarkLogic - mlcp export to a single output file

纵然是瞬间 提交于 2019-12-24 05:57:49
问题 MarkLogic version 9.0-6.2 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> 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

Execute MLCP Content Load Command as a schedule task in Marklogic

大城市里の小女人 提交于 2019-12-24 04:35:10
问题 Is there any possible way to bulk load data using MLCP as a scheduled task in Marklogic 回答1: You can't invoke mlcp via a scheduled task; I recommend trying something like Apache Camel for this. Camel has a Timer component and a Quartz component, either of which can be used for scheduling. And here's an example Camel file with a route (commented out, but still operable) that is initiated by a Timer which then writes a file to disk and ingests it via mlcp - https://github.com/rjrudin/ml-camel

split document by using MarkLogic mlcp

这一生的挚爱 提交于 2019-12-23 17:12:23
问题 I need to split this document <?xml version="1.0"?> <!DOCTYPE docs SYSTEM "../rom11.dtd"> <docs> <stwtext id="RD-10-00258" update="03.2011" seq="RQ-10-00001"> <head> <ti> <i>j</i> </ti> <ff-list> <ff id="0103" /> </ff-list> </head> <p> Symbol für die <vw idref="RD-19-04447">Stromdichte</vw> . </p> </stwtext> <stwtext id="RD-10-00209" update="12.2007" seq="RQ-10-00223"> <head> <ti>JZ</ti> <ff-list> <ff id="0932" /> </ff-list> </head> <p> Abkürzung für Jod-Zahl, siehe <vw idref="RD-06-00645"

MarkLogic - java heap space error while importing with mlcp

Deadly 提交于 2019-12-14 02:32:05
问题 Marklogic version : 9.0-6.2 mlcp version: 9.0.6 I am trying to import XML file into marklogic using MLCP uisng below code. #!/bin/bash mlcp.sh import -ssl \ -host localhost \ -port 8010 \ -username uname \ -password pword \ -mode local \ -input_file_path /data/testsource/*.XML \ -input_file_type documents \ -aggregate_record_namespace "http://new.webservice.namespace" \ -output_collections testcol \ -output_uri_prefix /testuri/ \ -transform_module /ext/ingesttransform.sjs The code is running

marklogic mlcp custom transform split aggregate document to multiple files

拥有回忆 提交于 2019-12-12 11:07:50
问题 I have a JSON "aggregate" file that I want to split up and ingest as multiple documents into MarkLogic using mlcp. I want to transform the content during ingestion using javascript. My JSON file looks something like this: { "type": "FeatureCollection", "features": [ {blobA}, {blobB}, {blobC} ...... ] } ...and I want to run this file through MLCP so that each document contains an item in the array. i.e. One document will contain {blobA}, another will contain {blobB}, and another will contain

Exception while copying data using MLCP

老子叫甜甜 提交于 2019-12-10 20:48:03
问题 I am trying to copy 1 million documents from one database to another database using MLCP but I am getting following Exception. 19/08/30 11:48:08 ERROR contentpump.DatabaseContentReader: RuntimeException reading /integration/test/88398921012548 :java.lang.RuntimeException: Could not buffer value as string I am not sure about the reason of this exception. Please guide me to understand the reason. MLCP with all the options that i used mlcp copy -mode local -input_host 192.168.1.46 -input_port

Loading data with mlcp - namespace issue

时间秒杀一切 提交于 2019-12-10 16:54:57
问题 I'm trying to load rss data from Wordpress into MarkLogic database. The data is in the form of following: <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0" xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.2/"> <item> <wp:post_id>1</wp:post_id> <wp:post_title>title 1</wp:post_title> <dc

Using Transform Module during MLCP Ingestion to MarkLogic

北战南征 提交于 2019-12-01 13:54:30
I am trying to implement envelope pattern when i am ingesting documents through MLCP My transform Module is like this : 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; My MLCP Command is like this 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