Install and deploy SAIKU on Tomcat, and deploy saiku on tomcat
Install and deploy SAIKU on Tomcat
Saiku is a powerful independent tool used to query and construct data marketplaces, such as ad hoc query reports, Chart display, and export reports in excel or csv format. Saiku is based on the Mondrian OLAP engine.
This article explains how to deploy saiku in tomcat step by step to make it easier and faster. Before you start, assume that you are familiar with the data mart database and how to create a Mondrian Schema. (Refer to the previous pentaho schema workbench graphic tutorial.)
The sample database, schema file, and saiku files can be downloaded here.
1. Download related programs
Ü download and install java
Ü download and install tomcat
Ü download saiku webapps
The download and installation of java and tomcat are not described here. The files corresponding to saiku can be downloaded from the above link.
2. Deployment of Saiku webapps
How can I stop the service before tomcat is running;
Rename the war file; saiku-ui-2.5.war to ROOT. war; saiku-webapp-2.5.war modified to saiku. copy two war files to the tomcat/webapp directory. Now you can start tomcat. Then, enter http: // localhost: 8080 in the browser to view the logon page of Saiku, enter admin and admin as passwords to log on to Saiku. Congratulations, Saiku has been deployed successfully.
3. Configure Saiku to use cubeSchema and database
You have deployed the webapps of Saiku, but you cannot select cube from the drop-down list. You need to configure it further.
Stop tomcat and copy the jdbc jar corresponding to the database to the tomcat/lib folder.
Declare cube as follows:
Copy the Mondrian schema (sales_mondrian.xml) file to tomcat/webapps/saiku/WEB-INF/classes/saiku-datasources/
Create a file named sales.txt under tomcat/webapps/saiku/WEB-INF/classes/saiku-CES/directory (the extension doesn't matter, you can just name it) and write the following content:
#declaration of Sauce Dallas sales cube for Sakiu
#———————————————
type=OLAP
name=SauceDallas
driver=mondrian.olap4j.MondrianOlap4jDriver
location=jdbc:mondrian:Jdbc=jdbc:mysql://localhost/1_tutorialSaiku;Catalog=res:saiku-datasources/sales_mondrian_schema.xml;JdbcDrivers=com.mysql.jdbc.Driver;
username=root
password=7777
We will explain in detail later. start tomcat below. Now we can see the corresponding cube in the drop-down box. You can drag dimensions and measurements to the corresponding axis to create a crosstab chart, and use charts to show or analyze useful information for your company.
4. Data Source Definition
The most boring part is the data source configuration of saiku, which will be explained in detail below.
Type = OLAPSpecifies an OLAP engine. No attributes other than OLAP have been seen.
Name: Name your data source.
Driver: Specify Mondrian driver. No other attribute values have been seen.
Location: This attribute consists of several parts, separated by semicolons.
Jdbc: mondrian: Jdbc = jdbc: mysql: // localhost/1_tutorialSaiku:
Specify the jdbc url corresponding to the database. You do not need to modify the previous part. You only need to modify the host and the corresponding database name. The host here is localhost and the corresponding database is1_tutorialSaiku
Catalog = res: saiku-datasources/sales_mondrian_schema.xml
Specify the mondrian schema file. Res indicates the file path, which starts from the saiku webapp directory;
JdbcDrivers = com. mysql. jdbc. Driver
Specifies the java class file as the database connection driver.