Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top