Tutorial Spagobi PDF
Tutorial Spagobi PDF
Tutorial Spagobi PDF
Table of Contents
How to install SpagoBI Meta ................................................................................................................................................... 3 Create a new DBMS connection .............................................................................................................................................. 4 Create the first Model ............................................................................................................................................................... 8 Create the first Query ............................................................................................................................................................. 15
Getting Started ( SpagoBI Meta - RC ) How to install SpagoBI Meta Create a new DBMS connection Create the first Model Create the first Query
Please note that this isn't the final product. A tutorial video can be found here: http://youtu.be/TFmDlMjVqss
Now inside the Data Source Explorer select "New...", your DBMS Connection type (for example MySql) and click next.
After that you have to specifiy a Driver and Connection details. If you haven't done this before you have to click on the "New driver definition icon". In this window you have to select the driver version, the driver JAR location (for MySql download it from http://dev.mysql.com/downloads/connector/j/ ) and the connection properties.
With the configured driver now you can test and edit the connection to your database. To test the connection simply press the "Test connection" button, if you get a "Ping succedded" messagge all is working.
Optionally create folder inside your project for every type of resources managed by SpagoBI Meta (models, queries, mappings...) for a better management of your work. For doing this, right-click on a project icon and select New > Folder. Now you can create your first SpagoBI Meta Model. Select on the menu bar File > New > Other > SpagoBI Meta > SpagoBI Model and press next.
Assign a name to your SpagoBI Meta Model file (.sbimodel extension), a logic name and select the location inside your project.
Next step is the selection of a connection. In this window you can see the connection already definied as described in the previous paragraph. You can also select a Catalog and Schema if avaiable for your database and connection.
Now you have to choose the tables to import from your database inside the Physical Model. The Physical Model is like a "snapshot" of your current database tables structure used to create Business objects inside the SpagoBI Model editor. Make sure to import all the tables that you want to use later in this step.
The last step let you quickly create Business Classes directly from the tables inside the Physical Model. This will create create Business Classes that have an identical structure (1:1) of your Physical Tables, with foreigns keys converted to business relationships, primary key to business identifiers and columns to attributes.
Now click on Finish and You have created your first SpagoBI Meta Model! Note that after clicking finish the SpagoBI Meta Model editor will be opened. On the left you have the Business Model representation as a tree, with the Business Classes, Attributes, Business Identifier and Business Relationship. On the right you have the Physical Model with the original structure extracted from your database connection.
In the Business Model you can change and combine the structure imported from the Physical Model. Just select the Business Model root or the Business Model Classes to create something new with the context menus. For example you can create new relationships through Business Classes, set new Business Identifiers, delete or rename Business Attributes and combine Business Classes to create composed Business Classes with inherited attributes. You can also do this operations via drag&drop directly from the Physical Model to the Business Model.
This will open a new wizard that let you create a new Query File (.metaquery) inside your project. The query file store you query definition and will be opened, edited and executed any time. Remember that to query your model the connection to the original database must be alive. The Query Editor is divided in two tabs (look at the bottom): The Edit tab: let you define and edit the query structure with a simple drag & drop graphical user interface. The Result tab: execute the query definied in the Edit Tab and shows the results in a grid with column sort and pagination.
In the Edit tab, on the left, you have your Business Model as tree with Business Classes and Business Attributes. Simply drag&drop them to the right panels to compose your query.
To the right you can see three panel for: Select Fields: the fields that will be showed in the results. You can apply alias name, aggregation functions, ordening, group by and more. Where clause: the filtering options that you want to apply to your interrogation. You can choose a left operand, an operation a write a right operand and combine it with another operand usign boolean connector. Having clause: this is similar to the where clause panel but applies to the group by operations.