Thanks Michael and David for the responses.
Being of a stubborn type, I added a bit of logging which indicated that all was 
well, so I thought I'd have a nose around for the "missing" documents... and 
found them in the "Fab" (temporary) database.
Armed with this information, Stack Overflow contains this useful answer:
http://stackoverflow.com/questions/10835374/split-xml-file-using-information-studio-in-marklogic/

Basically, I am falling over the action modules guideline, and you've pointed 
out better ways to handle this sort of data source.
Thanks again,Ed

From: [email protected]
To: [email protected]
Date: Tue, 17 Jun 2014 12:59:23 +0100
Subject: [MarkLogic Dev General] Loading files with fixed length fields







Hi,
I'm loading some text files that have fixed length fields via Information 
Studio in MarkLogic 7.
It uses an XQuery transform that should split the records via calls to 
fn:substring and generate a document for each row via xdmp:document-insert, 
however the only documents that are being inserted are the original text files.
Running a slightly different version of the XQuery script - replacing:
       let $doc := fn:doc( $cpf:document-uri )       for $inline in 
fn:tokenize( $doc , "\n")
with:
       for $inline in fn:tokenize( doc("/BS1.txt") , "\n")
splits the loaded file and inserts the rows as documents correctly.
Am I somehow falling over the "action modules should only modify the document 
being processed" guideline ?
...and is there a better way to handle this type of data source ?
Thanks,Ed
                                          

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
                                          
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to