Starting with SpagoBI Slide Support

Embed Size (px)

Citation preview

Data Visualization GEri - SpagoBI
Davide Zerbetto, Nunzia Marotta
Engineering
Data Visualization GE Manager, Data Visualization GE Course Creator - FIWARE
[email protected] ,[email protected]

Birt Report Designer

TOPIC OF THE COURSE: this course shows the creation process of a dataset and an analytical document from scratch

SpagoBI Project

Prerequisite: having a working SpagoBI Server installation

Installation instructions are available here:

http://spagobi.readthedocs.org/en/latest/admin/README/index.html We will refer to the SpagoBI Server base folder as SPAGOBI_SERVER_HOME.

In this course we will focus on:

configuring a new datasource connection;

creating a new dataset;

creating a new chart;

Step 1. Set datasource connection. In order to configure a new JNDI Data Source, you have to stop SpagoBI Server and edit the server.xml file, located in the folder SPAGOBI_SERVER_HOME\conf, as follows:

Dont foget to add the relative jdbc driver inside the folder: SPAGOBI_SERVER_HOME/lib.

Next, you have to edit every context.xml file located in every SPAGOBI_SERVER_HOME\webapps\SpagoBIxxx\META-INF folder, including SPAGOBI_SERVER_HOME\webapps\SpagoBI\META-INF.

Delete SPAGOBI_SERVER_HOME/conf/Catalina.

Start SpagoBI Server and log-in as superadmin; then enter Resources --> Data Source

Using SpagoBI you can define a new data source in two ways:

JNDI data source;

JDBC data source.

We recommend to define only JNDI datasources as described.

Test and save it.

One can also select Read Only and/or deselect the Write default: if the datasource is Write-default, it will be used by cache mechanism In our example we use a test database called my_database

Setting the JDBC connection presumes to know the URL of the DB and access it with a user ID and a password.

By the way, it is widely recommended to use the JNDI connection in production environment since it relies on connection pool while the JDBC one does not.

A dataset is a generic data provider. When defining an analytical document, users specify the dataset(s) to be considered for data retrieval, therefore they can completely forget about the data source: is this sense, the dataset can be considered a layer that levels all data sources and hides the underlying complexity.

Step 2. Create a new dataset.

There are several types of SpagoBI datasets, listed below:SQL query (most common)

File

Java Class

Web Service

Script

QbE query

REST service

NGSI query

CKAN resource

Enter Resources Data set

As an example we show the manual query definition.Enter the 'Type' tab and choose the query dataset type. Then insert your query and enter 'Preview' tab.

Click on Preview button in the Preview tab to test the dataset

Click on Save button to save the dataset

Some definitions before moving to the next steps:

Analytical document: object that defines an analysis that should satisfy the users analytical needs. These kind of documents can be created by technical users (editing a template or using the SpagoBI Studio package) or by final users (using the ad-hoc reporting tool). In this course we will focus on those documents developed by technical users.

Template: file containing the Analytical Document specifications. Developed using external tools such as SpagoBI Studio

Versions: many template versions can be stored for a single Analytical Document.A new version is registered for every deploy from the SpagoBI Studio and every time you manually upload a template from the administrator GUI on the SpagoBI Server

To create a new chart the technical user has mostly two options: one can write manually a chart template, simply setting the right properties in the relative XML file and, consequently, uploading the template as a new document into SpagoBI Server;

using the SpagoBI Studio package and deploying to SpagoBI Server.

We refer to our dedicated course My first report available on FIWARE platform to see how to build a new Report with Birt inside the SpagoBI Studio and use the deploy function.

See the website https://edu.fiware.org/course/view.php?id=141

Step 3. Create a new chart.

Enter the Document Browser section and click on Create Document to create your analytical document

Let's suppose we want to create a bar chart. In this case, its template is an XML file and it will look like the one showed here aside.

Fill in the mandatory boxes.

Select Type and Engine accordingly.

Upload the template file.

Type & engineDatasource & DatasetUpload template

Go back to the Documents Browser and click on the document icon in order to display the result:

Note that the State defines the document's visibility: only techinal users can access documents in development state. Technical users must change the State to 'Released' option to let final users see the document.

05/04/16

05/04/16

Click to edit the title text formatHaga clic para modificar el estilo de ttulo del patrn

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelHaga clic para modificar el estilo de texto del patrnSegundo nivelTercer nivelCuarto nivel

Quinto nivel

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelHaga clic para modificar el estilo de texto del patrn

Thanks!

Thanks!

05/04/16

Click to edit the title text formatHaga clic para modificar el estilo de ttulo del patrn

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelHaga clic para modificar el estilo de texto del patrnSegundo nivelTercer nivelCuarto nivel

Quinto nivel

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelHaga clic para modificar el estilo de texto del patrn

Click to edit the title text formatHaga clic para modificar el estilo de ttulo del patrn

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelHaga clic para modificar el estilo de texto del patrnSegundo nivelTercer nivelCuarto nivel

Quinto nivel

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelHaga clic para modificar el estilo de texto del patrn