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
For queries like: | |
select Measures.[Price Range] on columns, | |
Product.Products.Members on rows | |
from [Sales Cube] | |
..... | |
<CalculatedMember name="Price Range" formatString="#,##0.00 %" formula="PriceRange(Measures.Price)" dimension="Measures" visible="true"> | |
</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
public class FilterDynamicSchemaProcessor extends FilterDynamicSchemaProcessor implements DynamicSchemaProcessor { | |
@Override | |
protected String filter(String schemaUrl, PropertyList connectInfo, InputStream is) throws Exception { | |
String schema = super.filter(schemaUrl, connectInfo, is); | |
System.out.println("FilterDynamicSchemaProcessor filter() called"); | |
String schema = super.filter(schemaUrl, connectInfo, stream); | |
try | |
{ |
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 |
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
<%@ 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
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
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
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
<?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
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 |
NewerOlder