Professional Documents
Culture Documents
Angelo Bernabei
2011/02/10 10:41
Table of Contents
Create Datamart ......................................................................................................................................................................... 3
1 Reverse engineering the target database schema ................................................................................................................ 3
2 Hibernate mapping adjustement ........................................................................................................................................ 16
3 jar production for datamart representation ........................................................................................................................ 18
Create Datamart
The datamart is a data abstraction model built by means of Hibernate Tools. The main steps are:
1 Reverse engineering the target database schema
2 Hibernate mapping adjustement
3 jar production for datamart representation
Create a new Hibernate Configuration file under src folder(File Menu -> New ->#Other then Hibernate -> Hibernate
configuration file)
Choose the right dialect for your database and fill all the required fields (driver class, connection string, schema,
username and password). Then check 'create console configuration' and press 'Next'.
Fill the console name field and in the 'option' tab set the db dialect
In the 'classpath' include in the default classpath the proper jdbc driver for your target database than click 'Finish'
Select "Hibernate Code Generation Configuration..." from menu Run->Hibernate Code Generation ...
If you want to reverse engineering only some tables and not the full schema create a new reveng.xml file. To filter
tables click on 'Refresh' button and then wait until the full database schema is shown. At this point is possible to
choose which table to include in the code generation process. Once finished click on 'Finish'
Click on the 'Apply' button to save configuration and on the 'Run' button to execut the code generation process
Refresh the project (F5) and check out the newly created mappings and objects
TIPS: under SpagoBIQbeEngine web application you can find label.properties file, you can use this to create yours
custom file
If you need to localize labels and tooltips associated to each item in your datamart structure create a
label_loacle.properties for each locale you need to support (ex. label_it.properties, label_en.properties,
label_fr.properties, ecc ...)
Create in the project root folder a file named qbe.properties for changing the visual representation of schema items
(visibility, icons, position, ecc ...)