Hi Lucas, I’d recommend using option files. Put each arg on a separate line in a plain text file. Extension free to pick, extra empty lines are allowed for extra readability. The benefit is that you won’t be bothered by the double escaping of first passing in args to mlcp.sh, which in turn makes a sys-call to java with unescaped args.
Not sure it will be enough to solve the issue with spaces in your record identifier, but worth a shot. If that is not enough, use -generate_uri to get sequential database uris, and optionally combine with an MLCP transform to rewrite the uri to the desired value yourself.. Cheers, Geert From: <[email protected]<mailto:[email protected]>> on behalf of Lucas Davenport <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Tuesday, March 21, 2017 at 7:02 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] URI_ID whitespace problems with mlcp I am a newb, so forgive me if I missed this answer while searching. I am testing ML 8 for a project at work and we have a requirement to load large amounts of historical data. I've read the mlcp documentation and can successfully import some test data, but the problem I am facing is the archive data has a space in the record identifier. My command is: mlcp.sh import -host localhost -port 8006 -username dataload -password dataload -mode local -input_file_path ../xml/MD2014aggregate.xml -input_file_type aggregates -aggregate_record_element row -uri_id "row _id" -output_uri_prefix /traffic/MD -output_uri_suffix .xml -output_collections published This produces the following error: 17/03/21 13:49:20 ERROR contentpump.ContentPump: Unrecognized argument: \_id I've escaped both the space and the underscore (row\ _id and row\ \_id) and still get the same error. I've also wrapped in in single quotes and double quotes. I'm trying to keep from having to use sed to remove the space between row and _id in the entire file. Is there a way to make mlcp see the URI_ID literally as "row _id"? Thanks in advance.
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
