This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New features of the query model will be: | |
Basically everything will be based on levels. and for each you can: | |
- Sort | |
- Filter() | |
- Top- / Bottom Count/Percent/Sum | |
- Filter by name (e.g. Quarter1, so you dont have to select 2003.Quarter1, 2004.Quarter1, ....) | |
- Range selections { Time.2000 : Time.2010 } | |
Other new stuff: | |
- Calculated measures in a query (no wizard, just plain mdx fragments) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.saiku.web; | |
import java.net.URL; | |
import java.util.UUID; | |
import junit.framework.TestCase; | |
import org.apache.commons.httpclient.HttpClient; | |
import org.apache.commons.httpclient.UsernamePasswordCredentials; | |
import org.apache.commons.httpclient.methods.GetMethod; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following code demonstrates how to interact with the saiku webapp backend via Java. | |
You can check it out here: https://gist.github.com/3060118 | |
Basically it creates a http session (important for authentication) and then executes the following steps: | |
1. authenticate | |
2. check if authentication was successful | |
3. fetch a query called "test.saiku" | |
4. post the xml of that query to the workspace | |
5. execute the query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/// example by diamonddog ;) | |
class curl_request { | |
private static $opt = array( | |
// CURLOPT_CONNECTTIMEOUT => 20, | |
CURLOPT_RETURNTRANSFER => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is also a rudimentary parameter support in the latest saiku version. | |
You can find the latest version on our CI server: | |
plugin: http://ci.analytical-labs.com/job/saiku-plugin/ | |
standalone: http://ci.analytical-labs.com/job/saiku-server/ | |
You can then create a new mdx query | |
could be something like: | |
SELECT Measures.Sales on ROWS, | |
Organisations.[Test] on COLUMNS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the mondrian schema xml: | |
----------------------------------------------------------------------------------------------------------- | |
<CalculatedMember | |
name="Profit" | |
dimension="Measures"> | |
<Formula>[Measures].[Store Sales] - [Measures].[Store Cost]</Formula> | |
<CalculatedMemberProperty name="FORMAT_STRING" expression="Iif(([Measures].[Store Sales] - [Measures].[Store Cost]) < 10000, '|(#,##0.00 €)|style=red', '|#,##0.00 €|style=green')"/> | |
<CalculatedMemberProperty name="MEMBER_ORDINAL" value="4"/> | |
</CalculatedMember> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just copy over the jars in here into your local saiku: | |
saiku-server/tomcat/webapps/saiku/WEB-INF/lib | |
The "biq" file goes into: | |
saiku-server/tomcat/webapps/saiku/WEB-INF/classes/saiku-datasources | |
the bigquery.mondrian.xml goes into | |
saiku-server/tomcat/webapps/saiku/WEB-INF/classes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page pageEncoding="utf-8" %> | |
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core'%> | |
<%@ | |
page | |
language="java" | |
import="java.io.InputStream, | |
java.util.Map, | |
java.util.HashMap, | |
java.util.List, | |
java.util.ArrayList, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.saiku; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import java.util.Date; | |
public class Datestuff { | |
public static void main(String[] args) throws Exception { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH | |
member Time.CurrentDa as ([Time.Weekly].CurrentMember.Level.Name = "(All)") | |
member Measures.Now as | |
IIF ([Time.Weekly].CurrentMember.Level.Name = "(All)", | |
IIF ([Time].CurrentMember.Level.Name = "(All)", | |
0 | |
, [Time].CurrentMember) | |
,[Time.Weekly].CurrentMember | |
) | |
member Measures.Prev as |
OlderNewer