wiki:MolgenisFromExisting

TracNav(MolgenisGuide)?

Extract MOLGENIS model from existing database

There is legacy of existing databases, which you may inherit or get your hands on via SQL dumps/TEXT downloads. Below we will first generate a MOLGENIS for an existing database by automatically extracting the MOLGENIS data model from it. Second you will learn how to batch-load existing data sets from delimited text files.

Generating a MOLGENIS for an existing database

  1. Edit the database connection settings in the molgenis.properties file to refer to an existing database. See MolgenisPropertiesFile. In this example it is assumed you connect to the Address Book database from the AddressBookExample. Alternatively you can download a database dump of your choice or connect to a remote database (assuming proper DatabasePermissions).
  2. Run !handwritten/java/MolgenisExtractModel.java. The extraction tool will connect to your selected database and extract a model from its table structure. An example output for the Address Book Application
  3. Copy-paste the parts of XML you want to use in your *_db.xml file. Then add a suitable *_ui.xml. Then adapt the molgenis.properties file accordingly and generate,compile,run to view the results.

Example

Last modified 14 years ago Last modified on 2010-08-22T23:27:15+02:00

Attachments (1)

Download all attachments as: .zip