ml-modules.root.com.marklogic.smart-mastering.match-and-merge-trigger.xqy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-data-hub Show documentation
Show all versions of marklogic-data-hub Show documentation
Library for Creating an Operational Data Hub on MarkLogic
xquery version '1.0-ml';
import module namespace trgr = 'http://marklogic.com/xdmp/triggers' at '/MarkLogic/triggers.xqy';
import module namespace process = "http://marklogic.com/smart-mastering/process-records"
at "process-records.xqy";
import module namespace const = "http://marklogic.com/smart-mastering/constants"
at "/com.marklogic.smart-mastering/constants.xqy";
declare option xdmp:mapping "false";
declare variable $trgr:uri as xs:string external;
if (xdmp:document-get-collections($trgr:uri) = $const:MERGED-COLL) then
xdmp:trace($const:TRACE-MATCH-RESULTS, "Document at " || $trgr:uri || " is already in the " || $const:MERGED-COLL || " collection; skipping")
else (
xdmp:trace($const:TRACE-MATCH-RESULTS, "Triggered call to process-match-and-merge with URI=" || $trgr:uri),
process:process-match-and-merge($trgr:uri)
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy