Hi there,
consider moving my XML stuff for a particular project from eXist to BaseX.
I have a full dump from eXist with all related content and I want to import it 1:1 into BaseX…is there a bulk loader or what is the preferred way to import an existing folder structure? Of course I can create my own script what would import the data through WebDAV but the dump has about 50.000 files.
Andreas
Hi Andreas,
The CREATE-DB command can create a collection from a directory's structure [1]
Best regards, Fabrice ETANCHAUD
[1] : http://docs.basex.org/wiki/Commands#CREATE_DB
-----Message d'origine----- De : BaseX-Talk [mailto:basex-talk-bounces@mailman.uni-konstanz.de] De la part de Andreas Jung Envoyé : mardi 1 janvier 2019 16:22 À : BaseX Objet : [basex-talk] Bulk import (moving from eXist to BaseX)
Hi there,
consider moving my XML stuff for a particular project from eXist to BaseX.
I have a full dump from eXist with all related content and I want to import it 1:1 into BaseX…is there a bulk loader or what is the preferred way to import an existing folder structure? Of course I can create my own script what would import the data through WebDAV but the dump has about 50.000 files.
Andreas
Hi Andreas,
In BaseX, you can use the EXPORT command or the db:export function to write all database contents to disk [1,2]. I know too little about eXist-db; maybe they offer a similar feature?
After that, as Fabrice indicated, you can use the CREATE DB command to create a database by pointing to that directory. If the database contains non-XML resources, you may need to write a little XQuery script or a BaseX command script that imports the data in the format you prefer.
Hope this helps Christian
[1] http://docs.basex.org/wiki/Commands#EXPORT [2] http://docs.basex.org/wiki/Database_Module#db:export
On Tue, Jan 1, 2019 at 4:21 PM Andreas Jung lists@zopyx.com wrote:
Hi there,
consider moving my XML stuff for a particular project from eXist to BaseX.
I have a full dump from eXist with all related content and I want to import it 1:1 into BaseX…is there a bulk loader or what is the preferred way to import an existing folder structure? Of course I can create my own script what would import the data through WebDAV but the dump has about 50.000 files.
Andreas
My mistake Andreas, I completely forgot raw content...
By the way, Happy new year to all happy BaseX users, the BaseX team, and to you, Christian !
Best regards, Fabrice
-----Message d'origine----- De : BaseX-Talk [mailto:basex-talk-bounces@mailman.uni-konstanz.de] De la part de Christian Grün Envoyé : mercredi 2 janvier 2019 17:05 À : Andreas Jung Cc : BaseX Objet : Re: [basex-talk] Bulk import (moving from eXist to BaseX)
Hi Andreas,
In BaseX, you can use the EXPORT command or the db:export function to write all database contents to disk [1,2]. I know too little about eXist-db; maybe they offer a similar feature?
After that, as Fabrice indicated, you can use the CREATE DB command to create a database by pointing to that directory. If the database contains non-XML resources, you may need to write a little XQuery script or a BaseX command script that imports the data in the format you prefer.
Hope this helps Christian
[1] http://docs.basex.org/wiki/Commands#EXPORT [2] http://docs.basex.org/wiki/Database_Module#db:export
On Tue, Jan 1, 2019 at 4:21 PM Andreas Jung lists@zopyx.com wrote:
Hi there,
consider moving my XML stuff for a particular project from eXist to BaseX.
I have a full dump from eXist with all related content and I want to import it 1:1 into BaseX…is there a bulk loader or what is the preferred way to import an existing folder structure? Of course I can create my own script what would import the data through WebDAV but the dump has about 50.000 files.
Andreas
I decided to implement a direkt exist2basex copy script that allows me to copy over the content through WebDAV from one database to another other with just some Python lines with the benefit to taking care of arbitrary data and not only markup content:
https://gist.github.com/zopyx/770a4a0e0b34de5250d0ce54a4e509ec
-aj
On 1 Jan 2019, at 16:21, Andreas Jung wrote:
Hi there,
consider moving my XML stuff for a particular project from eXist to BaseX.
I have a full dump from eXist with all related content and I want to import it 1:1 into BaseX…is there a bulk loader or what is the preferred way to import an existing folder structure? Of course I can create my own script what would import the data through WebDAV but the dump has about 50.000 files.
Andreas
basex-talk@mailman.uni-konstanz.de