Data Warehouse Research 3 - JPIVOT Getting Started

xiaoxiao2021-04-10  506

Previous article studies the use of Mondrian research and extracting data, now study how to show data.

Start with the most basic Jpivot, Jpivot can be said to be Mondrian's sister project, which is a Java-based data warehouse performance layer tool. The home page of this project is in http://jpivot.sourceforge.net/, there is also a more useful thing in addition to JPVOIT, is said to be Mondrian's Eclipse plugin, in the previous article, I wrote Schema, this The plug-in should have a graphical design interface similar to MS, and then study this plugin again, the words retired, today's theme is Jpivot.

First of all, pay attention to two points:

Jpivot uses WCF (Web Component Framework), rendering web UI components based on XML / XSLT.

Jpivot is completely Taglib based entirely.

Looking for breakthroughs

Where to start, of course, start with Demo, open Demo in the browser, click on the example, and find that the link they point to is

http://localhost/mondrian/testpage.jsp? query = Mondiran

http://localhost/mondrian/testpage.jsp? query = XMLA

http://localhost/mondrian/testpage.jsp? query = fourThier

This is more clearly the target, first study TestPage.jsp.

2. TestPage.jsp research

In TestPage.JSP, a more important period is

<% - incrude query and title, so jsp May be used with difference queries -%>

<% - define table, navigator and forms -%>

Where acquire the value of parameter query, and match position in / web-inf / queries /, The extension is a JSP file.

Another sentence indicates that Query's name is query01.

Note that these two query are different, WCF's Query is the parameter name called Query, while JP's Query is the Mondrian's Query object.

After TestPage.JSP, Form, Navigator, Chart, etc. are also defined, and you will not do in-depth research first.

2. Mondrian.jsp Research Next Taken TestPage.JSP MONDRIAN.JSP, Open /Web-inf/queries/mondrian.jsp, haha, really like it. Here, the MONDRIAN Query is defined, and its ID is query01, and there is information about JDBC. And this Query corresponding MDX query SELECT statement.

Open XMLA.JSP discovery is also the same structure, which is more clear. Let's take our test in accordance with it.

3. Test

First write a Mondriantest.jsp placed in / web-inf / queries directory

<% @ Page session = "true" contenttype = "text / html; charset = ISO-8859-1"%> <% @ Taglib URI = "http://www.tonbeller.com/jpivot" prefix = "jp" %> <% @ taglib prefix = "c" URI = "http://java.sun.com/jstl/core"%>

Select {[MeasureS]. [Salary]} on columns, {[employee]. [Employeeid] .memetest

test query uses Mondrian OLAP

The MONDRIANTEST.XML used here is the one written in the previous article.

Then enter http://localhost/mondrian/testpage.jsp? Query = mondriantest, and you will see the picture we expect.

转载请注明原文地址:https://www.9cbs.com/read-133346.html

New Post(0)