The code for your MLCP transform will receive an XML document. Your transform code will then do a recursive descent transformation (see link I provided earlier). When it gets to a field you don't want to include, return the empty sequence.
-- Dave Cassel<http://davidcassel.net>, @dmcassel<https://twitter.com/dmcassel> Technical Community Manager MarkLogic Corporation<http://www.marklogic.com/> http://developer.marklogic.com/ From: "Khan, Zishan" <zishan.k...@capgemini.com<mailto:zishan.k...@capgemini.com>> Date: Tuesday, August 30, 2016 at 7:46 AM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>>, Dave Cassel <dave.cas...@marklogic.com<mailto:dave.cas...@marklogic.com>> Subject: RE: [MarkLogic Dev General] #CGO#How to ingest data of selected columns from CSV using MLCP & how to define and use primary key to see the log data (failed data in terms of Bad file) Thanks Dave, I got the ideas how to use transformation modules but I didn’t find any modules related to skipping the columns as in the MarkLogic material it was only a brief concept to use transformation on input data. Please guide me by putting your valuable inputs so that I could stair up step by step on MarkLogic ladder. Your efforts would be priceless and much appreciable, hope your input will work as a backbone for my solution. Regards, Zishan Khan / Capgemini Associate Consultant | FSGBU | Insight and Data From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Timothy Taylor Sent: Tuesday, August 30, 2016 4:04 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] #CGO#How to ingest data of selected columns from CSV using MLCP & how to define and use primary key to see the log data (failed data in terms of Bad file) Hey Dave, Tim Taylor from the alliances team here. Subscribed from my personal email. Any thoughts on whether an mlcp transform on the inbound side versus load as is and run a CORB job to clean up afterwards would perform better? Tim Sent from my iPhone On Aug 29, 2016, at 2:10 PM, Dave Cassel <dave.cas...@marklogic.com<mailto:dave.cas...@marklogic.com>> wrote: You can write an MLCP transform<http://docs.marklogic.com/guide/mlcp/import#id_82518>. That should get the individual XML documents as input and your output can structure them however you want. This post on recursive descent<http://developer.marklogic.com/blog/xquery-recursive-descent> should help, too — you'll use that in your transform. -- Dave Cassel<http://davidcassel.net>, @dmcassel<https://twitter.com/dmcassel> Technical Community Manager MarkLogic Corporation<http://www.marklogic.com/> http://developer.marklogic.com/ From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Khan, Zishan" <zishan.k...@capgemini.com<mailto:zishan.k...@capgemini.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Monday, August 29, 2016 at 8:12 AM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: [MarkLogic Dev General] #CGO#How to ingest data of selected columns from CSV using MLCP & how to define and use primary key to see the log data (failed data in terms of Bad file) Hi Folk, Being a newbie in MarkLogic, I need your serious response to come out of faced challenges. The moment when I was ingesting CSV Structured data into MarkLogic as-is to get XML output data in our database using MLCP, I am ok with normal ingestion using MLCP in any file format but I got stuck in finding the solution of below mentioned problem 1. How to ingest data corresponding to selected columns only in MarkLogic using MLCP or by any means. 2. How to define and use Primary key to check the logs ( say failed data ). For the ease of understanding I am exploring my doubts with below example. Input : id emp_name salary designation mobile_no dependent 1 ABC 3000 X 4444444444 2 2 DEF 4000 Y 2222222222 1 (input is in CSV format) 3 GHI 3000 X 3333333333 0 4 ABC 8000 Z 9999999999 2 Q.1) Output : id emp_name designation dependent 1 ABC X 2 2 DEF Y 1 (output is in default XML format, here this is just to understand) 3 GHI X 0 4 ABC Z 2 Q.2) Suppose input data corresponding to id = 4 is failed. Failed data : 4 ABC Z 2 (say) How to see this data using id as primary key (Even I don’t know how to mention primary key in MarkLogic) using MLCP or any other means. Your lead would be much more appreciated if I will get the solution of respected solution with required supporting stuffs. Thanks & Regards, Zishan Khan / Capgemini Associate Consultant | FSGBU | Insight and Data 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 General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general