marklogic / marklogic/marklogic-contentpump

MLCP transform on triple data does not insert into output_graph without additional steps

Open
#218 0 comments 0 reactions 1 assignee View on GitHub

@abika5 is already working on this.

Since Mar 25, 2022.

bug major mlcp new
Dominant language
Java
Stars
37
Forks
32
Avg merge
1h 3m
Merged PRs (30d)
12

Description

When running MLCP transform on triple data the context argument does not contain any collections. I suspect this is because triplestore data uses the -output_graph argument instead of the -output_collection argument. This requires me to pass in the output graph using -transform_param so that I can assign collections to the context in the transform function.

function transform(content, context) {
  const graph = context.transform_param;

  // Document transform logic

  // Without this line, the resulting document is not put into a graph
  context.collections = [graph];

  return content;
}

Suggested fix: Use -output_graph argument value as context.collections if there was no -output_collection argument provided.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.