MARKLOGIC: Is it possible to use more than 1 columns from a CSV file when generating URI ID during data ingestion in MarkLogic?

有些话、适合烂在心里 提交于 2019-12-02 04:35:46

You can use MLCP Transforms to transform both the content value, and the uri. It gets a hash object $content containing both. Update its values as desired, and return the updated hash object. Something like:

declare function example:transform(
  $content as map:map,
  $context as map:map
) as map:map*
{
  let $record := map:get($content, "value")
  let $uri := $record/prop1 || $record/prop2 || $record/prop3 
  let $_ := map:put($content, "uri", $uri)
  return $content
};

You can use such MLCP transforms in marklogic-data-hub as well.

HTH!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!