Thanks for  the quick input, just had a look at pre-commit trigger, looks like 
a solution, will give it a try.
MLCP/pre-commit will do, Writing off CPF solution for post-commit over-head 
reason, As I need to upload 1 TB Data.

Thank a lot.
[Email_CBE.gif]Abhishek Jain
Associate Consultant
Capgemini India | Hyderabad

[] On Behalf Of Geert Josten
Sent: Wednesday, September 21, 2016 6:53 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Validate XML documents while ingesting and 
maintain logs of failed documents #CGO#

Hi Abhishek,

Sounds right overall. An MLCP transform gives some flexibility when you want to 
validate or not. If you want to enforce it more strictly, you can use a 
pre-commit trigger, and deny commit if it doesn't validate by (re)throwing an 
error (or not catching the validate error).

I would recommend using a pre-commit trigger over CPF if it is only for 
validation. CPF comes with extra overhead, and actions run in post-commit too. 
You would not be able to prevent inserts, but only able to flag docs as being 


 on behalf of "Jain, Abhishek" 
Reply-To: MarkLogic Developer Discussion 
Date: Wednesday, September 21, 2016 at 3:03 PM
To: "<>" 
Subject: [MarkLogic Dev General] Validate XML documents while ingesting and 
maintain logs of failed documents #CGO#

Hi Folks,

I'm working on a use-case where I need to ingest bulk documents into Marklogic, 
only those documents which adhere to predefined ( have written my own)
XML schema should be loaded into DB. If fails then details should be written in 
a log file. My approach to achieve this so far is :

1.       Create an XSD.

2.       Write a MLCP transformation module or content processing framework 

3.       Validate content of each document inside the module and using try ... 
catch block

4.       If content is valid - insert , if not write to failed list (logs)

Am I going right ?
Can anyone share with me the best approach ?
Is there any other way of doing this than mlcp and CPF ?

Thanks and Regards,
[Email_CBE.gif]Abhishek Jain
Associate Consultant
People matter, results count.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.
General mailing list
Manage your subscription at:

Reply via email to