marklogic-data-hub
marklogic-data-hub copied to clipboard
[BUG] Merging step Invalid Argument Type issue
Hi everyone
I am having multiple errors during the merging step preventing me to run my flows
The errors are all related to invalid argument types
Message: Invalid argument type
URI: /datahub/5/mastering/match-summary/19e78658-2b56-4180-a38a-688f27bc2ce4.json
Details: XDMP-ARGTYPE: (err:XPTY0004) map:get((), "context") -- arg1 is not of type map:map
in /com.marklogic.smart-mastering/survivorship/merging/base.xqy, at 594:25,
in merge-impl:build-merge-models-by-uri(("/com.marklogic.smart-mastering/merged/fc06d4faaf534b6103a2021951...", "/origins/visit/appointment_completion/059acc66-ceb5-4ce9-99ff-34...", "/origins/visit/appointment_completion/1c3fdafc-a466-4b10-ad0b-73...", ...), json:object(<json:object xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" .../>), "/com.marklogic.smart-mastering/merged/fc06d4faaf534b6103a2021951...", ("/origins/participant/origins_id_number_form/d1ae2104-d0d6-496a-b...", "/origins/visit/appointment_completion/059acc66-ceb5-4ce9-99ff-34...", "/origins/visit/appointment_completion/1c3fdafc-a466-4b10-ad0b-73...", ...)) [1.0-ml]
$uris = ("/com.marklogic.smart-mastering/merged/fc06d4faaf534b6103a2021951...", "/origins/visit/appointment_completion/059acc66-ceb5-4ce9-99ff-34...", "/origins/visit/appointment_completion/1c3fdafc-a466-4b10-ad0b-73...", ...)
and the end of the message looks like this
in /data-hub/5/impl/invoke-step.sjs [javascript]
in /data-hub/5/builtins/steps/mastering/default/merging.sjs, at 111:24, in main() [javascript]
in /data-hub/5/impl/flow.sjs, at 631:11, in runMain() [javascript]
in /data-hub/5/impl/flow.sjs, at 381:59, in runStep() [javascript]
in /data-hub/5/impl/flow.sjs, at 270:11, in runFlow() [javascript]
in /data-hub/5/data-services/stepRunner/processBatch.sjs, at 41:13 [javascript]
in /data-hub/5/impl/invoke-step.sjs,
in xdmp:invoke("/data-hub/5/impl/invoke-step.sjs", {flowInstance:{config:{STAGINGDATABASE:"data-hub-STAGING", FINALDATABASE:"data-hub-FINAL", TRACEDATABASE:"data-hub-JOBS", ...}, datahub:{config:{STAGINGDATABASE:"data-hub-STAGING", FINALDATABASE:"data-hub-FINAL", TRACEDATABASE:"data-hub-JOBS", ...}, consts:{XQUERY:"xqy", JAVASCRIPT:"sjs", XML:"xml", ...}, debug:{logLevel:"default", logLevels:["default", "notice", "trace", ...], logTypes:["error", "warning", "notice", ...]}, ...}, stepDefinition:{performance:{config:{performanceMetrics:false}, dataHubMetrics:[], stepMetrics:[]}}, ...}, items:["/datahub/5/mastering/match-summary/01b51a7e-ad58-465c-ae83-e2501...", "/datahub/5/mastering/match-summary/057e2532-d84c-4f19-96c8-93356...", "/datahub/5/mastering/match-summary/07e68414-7134-4b35-87a8-573e7...", ...], content:[{uri:"/datahub/5/mastering/match-summary/01b51a7e-ad58-465c-ae83-e2501...", value:cts.doc("/datahub/5/mastering/match-summary/01b51a7e-ad58-465c-ae83-e2501b4540c7.json"), context:{permissions:[{capability:"read", roleId:"9817166411556333901"}, {capability:"update", roleId:"9817166411556333901"}], metadata:{datahubCreatedBy:"tkiadmin", datahubCreatedByStep:"matchedParticipants", datahubCreatedInFlow:"ORIGINS", ...}, originalCollections:["matchedParticipants", "datahubMasteringMatchSummary", "datahubMasteringMatchSummary-http://example.org/Participant-0.0...."]}}, {uri:"/datahub/5/mastering/match-summary/057e2532-d84c-4f19-96c8-93356...", value:cts.doc("/datahub/5/mastering/match-summary/057e2532-d84c-4f19-96c8-93356c9ad0e4.json"), context:{permissions:[{capability:"read", roleId:"9817166411556333901"}, {capability:"update", roleId:"9817166411556333901"}], metadata:{datahubCreatedBy:"tkiadmin", datahubCreatedByStep:"matchedParticipants", datahubCreatedInFlow:"ORIGINS", ...}, originalCollections:["matchedParticipants", "datahubMasteringMatchSummary", "datahubMasteringMatchSummary-http://example.org/Participant-0.0...."]}}, {uri:"/datahub/5/mastering/match-summary/07e68414-7134-4b35-87a8-573e7...", value:cts.doc("/datahub/5/mastering/match-summary/07e68414-7134-4b35-87a8-573e7022c5c2.json"), context:{permissions:[{capability:"read", roleId:"9817166411556333901"}, {capability:"update", roleId:"9817166411556333901"}], metadata:{datahubCreatedBy:"tkiadmin", datahubCreatedByStep:"matchedParticipants", datahubCreatedInFlow:"ORIGINS", ...}, originalCollections:["matchedParticipants", "datahubMasteringMatchSummary", "datahubMasteringMatchSummary-http://example.org/Participant-0.0...."]}}, ...], ...}, {database:"10188788867194543141", update:"false", commit:"auto", ...}) [javascript]
in /data-hub/5/data-services/stepRunner/processBatch.sjs [javascript]
in /data-hub/5/data-services/stepRunner/processBatch.sjs [javascript]
Any idea on the origins of argument type issue ?
Rad
It appears that the merge process is unable to find one or more documents referenced in the matching process. Can you verify that the step's source database has both the match summary documents and the documents you wish to merge and that no documents being merged are deleted between the match and merge steps?
More information such as the DH version and the match and merge steps used will be helpful to better diagnose.