wiki:MolgenisFromExisting

Version 7 (modified by Morris Swertz, 15 years ago) (diff)

--

Back to 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
  1. 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 (as learned in the previous section).

Attachments (1)

Download all attachments as: .zip