The following command line options instruct's GenRocket to retrieve one, many or all table schemas from a given database by connecting directly to the database via JDBC to extract the database's schema.  The extracted schema is saved to an encrypted file.  The encrypted file can then be imported from the GenRocket web application to automatically create Domains for each table whose schema is defined within the encrypted file.


--export-table-schema <<pathToJDBCFile> <tableNames>> 

Required Parameter

  • <pathToJDBCFile> - defines the path and file name of the JDBC Properties file 
    • Example: /home/jdoe/config/ 

Optional Parameter

  • <tableName> - defines the names of one or more tables whose schema is to be extracted  
    • Example: genrocket -xts /home/jdoe/config/ company,department,user
    • If table belongs to a particular schema in your database, e.g. schema1 then your command should include schema name as well
      • Example: genrocket -xts /home/jdoe/config/ schema1:company,schema1:department, schema1:user
    • If you want to export all tables of your schema, use <schemaName>:*
      • Example: genrocket -xts /home/jdoe/config/ schema1:*
    • Importing tables from more than one schema
      • Example: genrocket -xts /home/jdoe/config/ schema1:user,schema2:address
  • Note: By not providing any table names, all table's schema within the given database will be extracted

Connect to a Database

The GenRocket table schema importer must connect to a database via JDBC; it can do so by accessing a user's profile and locating a resource called, resource.jdbc.config.  The resource.jdbc.config will contain the path to a JDBC configuration file located on the local computer.

JDBC Configuration File

The JDBC configuration file must contain the following four parameters (the order of the parameters does not matter):

  • driver - the name of the database driver    
  • user - the username to connect to the database
  • password - the password to connect to the database
  • url - the universal resource locator to connect to the database 


Example JDBC Configuration File

The following example configuration file connects to a MySQL database called, acme.





Sequence of Events

The following sequence diagram describes the steps that GenRocket executes once a -its command is given:

Importing a .grt File

Login to GenRocket web, create or go to a project a take the following two steps:

From the Domains window, New Domains pull down, select New Domains from GTS.

Select the .gts file to import and click the save button.