>From https://docs.marklogic.com/guide/mlcp/export#id_66898 it looks like
that xquery is meant to just create the serialized query as you used on the
command line.

Options files are probably easier when you get to all these characters that
need quoting on the command line.

The example at that document says that an options file should contain the
following two lines:


-query_filter
<cts:document-query xmlns:cts="http://marklogic.com/cts
"><cts:uri>/id/xyz.xml</cts:uri></cts:document-query>


If you try just that for your file does it work?

You can also enable debugging as

https://docs.marklogic.com/guide/mlcp/troubleshoot#id_75840

to show the parameters it runs with.



On Mon, Aug 29, 2016 at 4:30 PM, Mahitha T U <mahita...@gmail.com> wrote:

> Hi ,
>
> I am using mlcp to copy an xml from Database to local system. I am using
> the following command
>
> mlcp.sh export -host localhost -port 8000 -username admin -password admin
> -mode local -database testDB -collection_filter test -query_filter
> "<cts:document-query xmlns:cts=\"http://marklogic.com/cts\
> "><cts:uri>/id/xyz.xml</cts:uri></cts:document-query>" -output_file_path
> output
>
> I am getting the following error
>
>  Unrecognized argument: xmlns:cts=\'http://marklogic.com/cts\
> '><cts:uri>/id/xyz.xml</cts:uri></cts:document-query>
>
> I created an xqy file
> let $query := <cts:document-query xmlns:cts='http://marklogic.com/cts
> '><cts:uri>/id/xyz.xml</cts:uri></cts:document-query>
> let $q := xdmp:quote(
>   <query>{$query}</query>/*,
>   <options xmlns="xdmp:quote"><indent>no</indent></options>
> )
> return $q
>
> And ran the following command
> mlcp.sh export -host localhost -port 8000 -username admin -password admin
> -mode local -database testDB -collection_filter test -options_file
> query.xqy -output_file_path output
>
> But got the following error
>  ERROR contentpump.ContentPump: Unrecognized argument: let $query :=
> <cts:document-query xmlns:cts='http://marklogic.com/cts
> '><cts:uri>/id/xyz.xml</cts:uri></cts:document-query>
>
> Please help me resolve this issue.
>
> Thanks
> Mahitha
>
>
>
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to