list archives . users mailing list

Subject: Re: Need help with ogsadai scripts

Date view Thread view Subject view Author view Attachment view

From: Shishir S. Bharathi (shishir@ISI.EDU)
Date: Mar 30, 2003 23:52

Sorry, didn't mean to make my mail sound like a flame. I just didn't know
if my approach was the way to do it.
In my application I'm going to be reading in an xml document and updating
a bunch of tables (10-12) with the data. I was wondering about what would
be the best way to do this. Right now I'm doing this the straightforward
way, with a <statement> for each insert.
Are there any better ways to do this using named scripts or predefined
scripts ?
I know that if I get an element <XYZ> in my xml document, I'm going to
update tables x1, x2, x3. So I wanted to know if I could get around
building the ogsadai script DOM, and having it parsed by DAI
everytime.
Let me know of your suggestions.

Thanks,
Shishir

On Fri, 28 Mar 2003, George Hicken1 wrote:

>
> Shishir,
>
> Firstly my apologies for not responding to your query about multiple
> statements sooner.
> We are working towards release 2 at the moment and this should fix some of
> the problems you are having. Release 2 moves much closer to the DIAS
> specification with the main exception being the way parameterization is
> done.
> It would be useful to us if you could detail what it is you are trying to
> do so that we can check that we are testing/supporting that functionality.
>
> Currently I do not have a working release 1 or 1.5 to test this with, but
> the following "should" work for multiple parameters:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- (c) International Business Machines Corporation, 2002, 2003. (c)
> University of Edinburgh 2002, 2003.-->
> <!-- See OGSA-DAI-Licence.txt for licencing information.-->
> <GridDataServiceScript>
> <Header>
> <ScriptName>Example 1</ScriptName>
> <Version>
> <Config>config</Config>
> <ScriptEnvironment>environment</ScriptEnvironment>
> </Version>
> <Originator>GSR of Originator</Originator>
> </Header>
> <Body>
> <Documentation>Select with data delivered with the response</
> Documentation>
> <DefineParameter name="table">trial</DefineParameter>
> <Statement name="s1" dataResource="MyDataResource">
> SELECT name FROM <UseParameter reference="table"/> WHERE <
> UseParameter reference="id"/>
> </Statement>
> <Delivery name="delivery">
> <Mechanism type="bulk"/>
> <Mode type="full"/>
> <From>s1</From>
> <To>response</To>
> </Delivery>
> <DefineParameter name="id">id = 0</DefineParameter>
> <Execute name="execute1">s1</Execute>
>
> <DefineParameter name="id">id = 1</DefineParameter>
> <Execute name="execute2">s1</Execute>
>
> <DefineParameter name="id">id = 2</DefineParameter>
> <Execute name="execute3">s1</Execute>
> </Body>
> </GridDataServiceScript>
>
> This should give a response of the form:
>
> <GDSSR>
> <Header>
> <ScriptName>Example 1</ScriptName>
> <Version/>
> </Header>
> <Body>
> <Response>
> <Status>
> [GridDataServiceScript:Example 1] - finished execution
> </Status>
> <Result name="execute1">
> <!-- results for the first execute -->
> </Result>
> <Result name="execute2">
> <!-- results for the second execute -->
> </Result>
> <Result name="execute3">
> <!-- results for the third execute -->
> </Result>
> </Response>
> </Body>
> </GDSSR>
>
> As I said I have been unable to test this. However as one of the tests run
> against ogsadai as part of our testing covers almost exactly this query you
> shouldn't have a problem.
> --
> George Hicken
> hickeng@uk.ibm.com
>


Date view Thread view Subject view Author view Attachment view