Download Create the first Model

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Relational model wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

Database model wikipedia , lookup

Transcript
spagobi_meta - SpagoBI Meta
S
pa
go
BI
M
et
a
Marc
o
Corte
lla
2011
/05/0
9
17:4
5
Table of Contents
How install SpagoBI Meta ............................................................................................................................................................................................................
Create a new DBMS connection ...............................................................................................................................................................................................
Page 1 - last modified by Marco Cortella on 2011/05/09 17:45
spagobi_meta - SpagoBI Meta
Create the first Model ....................................................................................................................................................................................................................
Create the first Query ....................................................................................................................................................................................................................
Getting Started Guide ( SpagoBI Meta - RC )
•
How install SpagoBI Meta
•
Create a new DBMS connection
•
Create the first Model
•
Create the first Query
Please note that this isn’t a final product.
How install SpagoBI Meta
To install SpagoBI Meta just uncompress the downloaded zip into a directory of your choice.
Now locate the “eclipse” directory where you have uncompressed the files and launch the eclipse.exe file to start
SpagoBI Meta.
The first thing to do is to select a workspace, or select one already existing, where you want to save the files
used by SpagoBI Meta (models,queries,etc...).
Create a new DBMS connection
•
To create a new DBMS connection make sure to have opened the “Data Source Explorer” view. For
opening this view select the menu Window > Show View > Other > Data Management > Data Source
Explorer.
Page 2 - last modified by Marco Cortella on 2011/05/09 17:45
spagobi_meta - SpagoBI Meta
•
Now inside the Data Source Explorer select “New..”, your DBMS Connection type (for example MySql) and
click next.
Page 3 - last modified by Marco Cortella on 2011/05/09 17:45
spagobi_meta - SpagoBI Meta
•
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.
Page 4 - last modified by Marco Cortella on 2011/05/09 17:45
spagobi_meta - SpagoBI Meta
•
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.
Page 5 - last modified by Marco Cortella on 2011/05/09 17:45
spagobi_meta - SpagoBI Meta
Create the first Model
To create your first model proceed with this steps:
•
•
•
•
•
First of all, create a new empty project inside the “Project Explorer” View. Select on the menu bar File >
New > Project > General > Project. This will ask you a name for your project and a location (by default
inside your current workspace, this is the recommended choice).
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
Page 6 - last modified by Marco Cortella on 2011/05/09 17:45
spagobi_meta - SpagoBI Meta
•
•
•
•
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 Spago BI 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.
Create the first Query
Once you have created your Business Model, with all the objects that you need, you can query this with the
SpagoBI Meta Query Editor. To create a new Query you can:
•
•
Right-click on the Business Model Root in the Business Model Editor and select Create > New Query
Or right-click on a file .sbimodel inside your Project Explorer and select Create > New Query
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
inside.
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.
Page 7 - last modified by Marco Cortella on 2011/05/09 17:45