4

I am tring to use the marklogic content pump in ML 7. Downloaded mlcp from site trying to load one xml.

From Marklogic documentation: The following example loads files from the local filesystem directory /space/bill/data:

mlcp.sh import -host localhost -port 8006 -username user \ -password passwd -input_file_path /space/bill/data -mode local

but it gives me the full path on the -input_file_path.

My mlcp invocation:

./mlcp.sh import -host localhost -port 18041 -username xxxx -password 'xxxxx' -mode local -streaming -document_type XML -input_file_path file:/home/hugo/workspace/oplage-mapping/data -output_uri_prefix /data/map

According to the documentation this would give me a document uri like

/data/map/filename

I tried a lot of things, finally putting the file that i wanted to load in the root of my OS which got me the desired result...

Looks like mlcp keeps using the default uri as the full path of the document I am trying to insert from the OS...

Question: How can I control the document uri so that it gives me the desired URI?

scotthenninger
  • 3,921
  • 1
  • 15
  • 24
Hugo Koopmans
  • 1,349
  • 1
  • 15
  • 27

1 Answers1

3

I believe that output_uri_prefix needs to be used in conjunction with another option, such as output_uri_replace, aggregate_uri_id, etc.

I tend to use output_uri_replace; in your case, it looks like -output_uri_replace "^.*/workspace,''" would give you URIs starting with /data.

joemfb
  • 3,056
  • 20
  • 19
  • 1
    ok iĺl accept your answer, what worked is this ./mlcp.sh import -host localhost -port 18041 -username xxxx -password 'xxxx' -mode local -streaming -document_type XML -input_file_path file:/home/hugo/workspace/oplage-mapping/data -output_uri_replace "^.*/data,''" -output_uri_prefix /data/map – Hugo Koopmans Apr 01 '14 at 19:26