command script / batch-processing of xqueries

Monday, 18 April 2016 · 5 messages · last reply 19 Apr 2016
GD
Günter Dunz-Wolff18 Apr 2016 16:52 #
Hi all, hi Christian, I'm running some xqueries to create and update basex dbs over and over again. They all depend on the basic db 'mydata'. Whenever mydata is updated, I have to update the other dbs. 1. xq-file: db:create('mydata', path/to/my/xml ..... 2. xq-file: db:create('searchindex', let $data0 := db:open('mydata') ..... 3. xq-file: db:create('indd-xml', let $data0 := db:open('mydata').... 4. and so on First question: Is there any way to put the whole process into one command-script? Or is there any kind of other batch-processing? Second question: So far I'm creating the db 'mydata' with the GUI. I want to integrate the creating into the batch-processing via XQuery. In generell I know the create-command, but where to put the options: use XInclude, chop-whitespace OFF and Fulltext Language German internal, Stemming OFF, Case Sensitive and Diacritics ON? Can't find it in the docs. Thanks for any help, Günter
EF
Etanchaud Fabrice18 Apr 2016 17:16 #
Hello Günter, Did you have a look at http://docs.basex.org/wiki/Commands#Command_Scripts You can use several XQUERY or RUN commands, and the SET command to configure the db or index options. Best regards, Fabrice Etanchaud Horanet Smart Objects -----Message d'origine-----
Quoted text · Günter Dunz-Wolff · 16 lines
De : basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de Günter Dunz-Wolff Envoyé : lundi 18 avril 2016 16:52 À : BaseX <basex-talk at mailman.uni-konstanz.de>; Christian Grün <christian.gruen at gmail.com> Objet : [basex-talk] command script / batch-processing of xqueries Hi all, hi Christian, I'm running some xqueries to create and update basex dbs over and over again. They all depend on the basic db 'mydata'. Whenever mydata is updated, I have to update the other dbs. 1. xq-file: db:create('mydata', path/to/my/xml ..... 2. xq-file: db:create('searchindex', let $data0 := db:open('mydata') ..... 3. xq-file: db:create('indd-xml', let $data0 := db:open('mydata').... 4. and so on First question: Is there any way to put the whole process into one command-script? Or is there any kind of other batch-processing? Second question: So far I'm creating the db 'mydata' with the GUI. I want to integrate the creating into the batch-processing via XQuery. In generell I know the create-command, but where to put the options: use XInclude, chop-whitespace OFF and Fulltext Language German internal, Stemming OFF, Case Sensitive and Diacritics ON? Can't find it in the docs. Thanks for any help, Günter
GD
Günter Dunz-Wolff18 Apr 2016 18:54 #
Hello Fabrice, thanks for the info. Did see the SET, but didn't notice http://docs.basex.org/wiki/Options#Create_Options
Quoted text · Etanchaud Fabrice · 1 line
> You can use several XQUERY or RUN commands,
I'd like to run a lot of existing XQuery-files (where dbs are created and updated) with ONE command. Perhaps I should define a new xq with xi:include the others and RUN this one file? Thanks again, Günter
Quoted text · Etanchaud Fabrice · 46 lines
> Am 18.04.2016 um 17:16 schrieb Etanchaud Fabrice <Fabrice.Etanchaud at horanet.com>: > > Hello Günter, > > Did you have a look at > > http://docs.basex.org/wiki/Commands#Command_Scripts > > You can use several XQUERY or RUN commands, > and the SET command to configure the db or index options. > > Best regards, > Fabrice Etanchaud > Horanet Smart Objects > > -----Message d'origine----- > De : basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de Günter Dunz-Wolff > Envoyé : lundi 18 avril 2016 16:52 > À : BaseX <basex-talk at mailman.uni-konstanz.de>; Christian Grün <christian.gruen at gmail.com> > Objet : [basex-talk] command script / batch-processing of xqueries > > Hi all, hi Christian, > > I'm running some xqueries to create and update basex dbs over and over again. They all depend on the basic db 'mydata'. Whenever mydata is updated, I have to update the other dbs. > > 1. xq-file: db:create('mydata', path/to/my/xml ..... > 2. xq-file: db:create('searchindex', let $data0 := db:open('mydata') ..... > 3. xq-file: db:create('indd-xml', let $data0 := db:open('mydata').... > 4. and so on > > First question: > Is there any way to put the whole process into one command-script? Or is there any kind of other batch-processing? > > Second question: > So far I'm creating the db 'mydata' with the GUI. I want to integrate the creating into the batch-processing via XQuery. In generell I know the create-command, but where to put the options: use XInclude, chop-whitespace OFF and Fulltext Language German internal, Stemming OFF, Case Sensitive and Diacritics ON? Can't find it in the docs. > > Thanks for any help, > > Günter > > > > > > >
EF
Etanchaud Fabrice19 Apr 2016 09:15 #
Hello Günter, You do can run several xquery files in a single command script with a syntax like this :
<commands>
	<xquery>...</xquery>
	<xquery>...</xquery>
	<xquery>...</xquery>
	<xquery>...</xquery>
</commands>
IMHO Xquery scripts are like transactions, You might overflow memory if you put all your updating functions in a single huge transaction. And in can remember db:create being executed after db:add, so your Pending update list might be meaningless at the end : http://docs.basex.org/wiki/XQuery_Update#Pending_Update_List Best regards, Fabrice Etanchaud Horanet Smart Objects -----Message d'origine-----
Quoted text · Günter Dunz-Wolff · 60 lines
De : Günter Dunz-Wolff [mailto:kleist at mail.dunzwolff.de] Envoyé : lundi 18 avril 2016 18:55 À : Etanchaud Fabrice <Fabrice.Etanchaud at horanet.com> Cc : Christian Grün <christian.gruen at gmail.com>; BaseX <basex-talk at mailman.uni-konstanz.de> Objet : Re: [basex-talk] command script / batch-processing of xqueries Hello Fabrice, thanks for the info. Did see the SET, but didn't notice http://docs.basex.org/wiki/Options#Create_Options > You can use several XQUERY or RUN commands, I'd like to run a lot of existing XQuery-files (where dbs are created and updated) with ONE command. Perhaps I should define a new xq with xi:include the others and RUN this one file? Thanks again, Günter > Am 18.04.2016 um 17:16 schrieb Etanchaud Fabrice <Fabrice.Etanchaud at horanet.com>: > > Hello Günter, > > Did you have a look at > > http://docs.basex.org/wiki/Commands#Command_Scripts > > You can use several XQUERY or RUN commands, and the SET command to > configure the db or index options. > > Best regards, > Fabrice Etanchaud > Horanet Smart Objects > > -----Message d'origine----- > De : basex-talk-bounces at mailman.uni-konstanz.de > [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de > Günter Dunz-Wolff Envoyé : lundi 18 avril 2016 16:52 À : BaseX > <basex-talk at mailman.uni-konstanz.de>; Christian Grün > <christian.gruen at gmail.com> Objet : [basex-talk] command script / > batch-processing of xqueries > > Hi all, hi Christian, > > I'm running some xqueries to create and update basex dbs over and over again. They all depend on the basic db 'mydata'. Whenever mydata is updated, I have to update the other dbs. > > 1. xq-file: db:create('mydata', path/to/my/xml ..... > 2. xq-file: db:create('searchindex', let $data0 := db:open('mydata') ..... > 3. xq-file: db:create('indd-xml', let $data0 := db:open('mydata').... > 4. and so on > > First question: > Is there any way to put the whole process into one command-script? Or is there any kind of other batch-processing? > > Second question: > So far I'm creating the db 'mydata' with the GUI. I want to integrate the creating into the batch-processing via XQuery. In generell I know the create-command, but where to put the options: use XInclude, chop-whitespace OFF and Fulltext Language German internal, Stemming OFF, Case Sensitive and Diacritics ON? Can't find it in the docs. > > Thanks for any help, > > Günter > > > > > > >
GD
Günter Dunz-Wolff19 Apr 2016 10:49 #
Hello Farbrice, thanks for your advice and the tipps. They are really helpful. With memory-overflow I have to see, what happens ;) Best regards, Günter
Quoted text · Etanchaud Fabrice · 94 lines
> Am 19.04.2016 um 09:15 schrieb Etanchaud Fabrice <Fabrice.Etanchaud at horanet.com>: > > Hello Günter, > > You do can run several xquery files in a single command script with a syntax like this : > > <commands> > <xquery>...</xquery> > <xquery>...</xquery> > <xquery>...</xquery> > <xquery>...</xquery> > </commands> > > IMHO Xquery scripts are like transactions, > You might overflow memory if you put all your updating functions in a single huge transaction. > And in can remember db:create being executed after db:add, so your Pending update list might be meaningless at the end : > > http://docs.basex.org/wiki/XQuery_Update#Pending_Update_List > > > Best regards, > Fabrice Etanchaud > Horanet Smart Objects > > -----Message d'origine----- > De : Günter Dunz-Wolff [mailto:kleist at mail.dunzwolff.de] > Envoyé : lundi 18 avril 2016 18:55 > À : Etanchaud Fabrice <Fabrice.Etanchaud at horanet.com> > Cc : Christian Grün <christian.gruen at gmail.com>; BaseX <basex-talk at mailman.uni-konstanz.de> > Objet : Re: [basex-talk] command script / batch-processing of xqueries > > Hello Fabrice, > > thanks for the info. Did see the SET, but didn't notice http://docs.basex.org/wiki/Options#Create_Options > >> You can use several XQUERY or RUN commands, > > I'd like to run a lot of existing XQuery-files (where dbs are created and updated) with ONE command. > > Perhaps I should define a new xq with xi:include the others and RUN this one file? > > Thanks again, > Günter > >> Am 18.04.2016 um 17:16 schrieb Etanchaud Fabrice <Fabrice.Etanchaud at horanet.com>: >> >> Hello Günter, >> >> Did you have a look at >> >> http://docs.basex.org/wiki/Commands#Command_Scripts >> >> You can use several XQUERY or RUN commands, and the SET command to >> configure the db or index options. >> >> Best regards, >> Fabrice Etanchaud >> Horanet Smart Objects >> >> -----Message d'origine----- >> De : basex-talk-bounces at mailman.uni-konstanz.de >> [mailto:basex-talk-bounces at mailman.uni-konstanz.de] De la part de >> Günter Dunz-Wolff Envoyé : lundi 18 avril 2016 16:52 À : BaseX >> <basex-talk at mailman.uni-konstanz.de>; Christian Grün >> <christian.gruen at gmail.com> Objet : [basex-talk] command script / >> batch-processing of xqueries >> >> Hi all, hi Christian, >> >> I'm running some xqueries to create and update basex dbs over and over again. They all depend on the basic db 'mydata'. Whenever mydata is updated, I have to update the other dbs. >> >> 1. xq-file: db:create('mydata', path/to/my/xml ..... >> 2. xq-file: db:create('searchindex', let $data0 := db:open('mydata') ..... >> 3. xq-file: db:create('indd-xml', let $data0 := db:open('mydata').... >> 4. and so on >> >> First question: >> Is there any way to put the whole process into one command-script? Or is there any kind of other batch-processing? >> >> Second question: >> So far I'm creating the db 'mydata' with the GUI. I want to integrate the creating into the batch-processing via XQuery. In generell I know the create-command, but where to put the options: use XInclude, chop-whitespace OFF and Fulltext Language German internal, Stemming OFF, Case Sensitive and Diacritics ON? Can't find it in the docs. >> >> Thanks for any help, >> >> Günter >> >> >> >> >> >> >> > >

⚡Generated with XQuery