corb - MarkLogic Xquery -


i in need of using corb generate report.

data: collection : col1,col2,col3,col4 collecntion b: col1,col5,col6,col7 collection c: col1,col8,col9  output requirement: col1,col2,col5,col6,col8 

where col1 in way inner join in collections b,c

my uri.xqylooks this:

(:get list col1 join on all:) let $listfromcol1 := cts:element-values(xs:qname("col1"),(),(),cts:and-query(....))  let $a := cts:uris((),(),cts:and-query((cts:collection-query("a"),cts:element-range-query(xs:qname("col1"),"=",$listfromcol1))) let $b := cts:uris((),(),cts:and-query((cts:collection-query("b"),cts:element-range-query(xs:qname("col1"),"=",$listfromcol1))) let $c := cts:uris((),(),cts:and-query((cts:collection-query("c"),cts:element-range-query(xs:qname("col1"),"=",$listfromcol1))) 

now, got uris individual collections. need pass process.xqy in return (count($uris), $uris).

i wonder how count of $a,$b,$c , concat uris of $a,$b,$c.

please help

if have extremely large set of uris, may want enable disk-queue option.

disk-queue=true avoid out of memory exceptions allowing corb spill on disk when receiving , managing queue of uris returned uris.xqy, instead of holding them in memory.

if need distinct set of uris in output, return of uri candidates in process module , let corb de-duping using export-file-sort=ascending|distinct option exportbatchtofiletask.

example properties enabling options:

disk-queue=true export-file-name=/local/path/to/exportfile.txt export-file-sort=ascending|distinct process-task=com.marklogic.developer.corb.exportbatchtofilet‌​ask 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -