ml-modules.transforms.mlRunIngest.sjs 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
'use strict';
const mjsProxy = require("/data-hub/core/util/mjsProxy.sjs");
const ingestTransform = mjsProxy.requireMjsModule("/data-hub/core/stepRunner/ingestTransform.mjs");
function transform(context, params, content) {
const results = ingestTransform.transform(context, params, content);
Object.assign(context, results.context);
return Sequence.from(results.content.map(r => {
try {
return xdmp.unquote(xdmp.quote(r))
} catch (e) {
return r;
}
}));
}
exports.transform = transform;
© 2015 - 2024 Weber Informatics LLC | Privacy Policy