dan
dan

Reputation: 131

MarkLogic MLCP: Is it possible to set a specific Modules database as a command-line option

I am executing an MLCP load over port 8000 (query console). I am able to set the content database I am loading into with the option -database . But I would also like to execute a transform. The trouble is when i execute the transform, MLCP is looking in the Modules database associated with Query Console, not the Modules database associated with my content database. Is there a command option in MLCP that I can invoke to specify a different Modules database for my transform?

Thanks, --Dan

Upvotes: 1

Views: 142

Answers (2)

kcoleman
kcoleman

Reputation: 666

If you're using MarkLogic 9.0-2 or later and mlcp 9.0-2 or later, try using -modules dbname. There is an accompanying -modules_root root_path option that you might also need. For example:

mlcp.sh ... -modules "myModuleDb" -modules_root "/" ...

They're not documented, but that is a (reported) documentation bug, rather than a deliberate obfuscation.

Upvotes: 1

grtjn
grtjn

Reputation: 20414

The modules database is determined by app-server, not by content database, contrary to schemas and triggers db, which are linked to the content db explicitly. So yes, wst is right, the only way to do this is to create a new app-server which combines the desired content and modules database, and run MLCP against that.

In MarkLogic 8 and newer, you can use either an custom REST api instance (essentially an HTTP server with specific configuration), or an XDBC server as mentioned by wst. Here is documentation on how to create a REST api instance:

https://docs.marklogic.com/guide/rest-dev/service

HTH!

Upvotes: 1

Related Questions