Dell - Internal Use - Confidential
Hi all,

How to obtain URI path of database?

From: [email protected] 
[mailto:[email protected]] On Behalf Of David Lee
Sent: Friday, January 31, 2014 6:01 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] module to join two xml files

First you need a module header then try this manually by using xdmp:invoke()
A module header looks like

declare module namespace  mine="/mycompany/mymodule" ;

Put that as the first line and store it in the Modules database (or some other 
database you want to use as modules)

Test that you can invoke this manually using xdmp:invoke()

Then in the Create Scheduled Task page, in the admin  GUI (port 8001)   Groups 
- > Default -> Scheduled Tasks
when you create a scheduled task you set the MOdules database (where this code 
lives) AND the Database (where the default
DATA database lives)

that should do it


From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of 
[email protected]<mailto:[email protected]>
Sent: Friday, January 31, 2014 7:22 AM
To: [email protected]<mailto:[email protected]>
Subject: [MarkLogic Dev General] module to join two xml files


Dell - Internal Use - Confidential
Hi All,

//Query to join 2 xml files

<books-with-prices>
  {
    for $b in doc()//book,
        $a in doc()//book1
    where $b/title = $a/title
    return
        <book-with-prices>
            { $b/title }
            <price-bstore2>{ $a/price/text() }</price-bstore2>
            <price-bstore1>{ $b/price/text() }</price-bstore1>
<year-bstore1>{ $b/year/text() }</year-bstore1>
<date-bstore1>{ $b/date/text() }</date-bstore1>
        </book-with-prices>
  }
</books-with-prices>

I have executed this query successfully on Query Console. The requirement is to 
write a MODULE for the same query so that it can be used for scheduling. How to 
specify URI root(database) while scheduling the task?

[cid:[email protected]]

Priyanka L
Senior Engineer - BIG DATA
Business Innovation Services - BIDW
Dell Services
Email:[email protected]| Mobile:+91 9945785355



<<inline: image001.jpg>>

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to