-
Notifications
You must be signed in to change notification settings - Fork 1
/
TODO
33 lines (27 loc) · 4.24 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
export from query: this.saiku.rootpath + this.saiku.username + "/query/" + this.queryname + "/export/" + mimetype;
export from file: /pentaho/plugin/saiku/api/admin/export/saiku/xls?file=/home/admin/002.saiku
create saiku analysis file:
POST http://localhost:8080/pentaho/plugin/saiku/api/admin/repository/resource
name=/public/test2.saiku&file=/public/test2.saiku&content=<?xml version="1.0" encoding="UTF-8"?>
<Query name="2AA5BBD2-C15D-A675-BA74-C204266B5E20" type="MDX" connection="MYSQL_TEST" cube="[Pedidos]" catalog="MYSQL_TEST" schema="MYSQL_TEST">
<MDX>SELECT
NON EMPTY {Hierarchize({[Measures].[Volume Vendas]})} ON COLUMNS,
NON EMPTY {Hierarchize({[Cliente].[Cliente].Members})} ON ROWS
FROM [Pedidos]</MDX>
<Totals />
<Properties>
<Property name="saiku.olap.query.nonempty" value="true" />
<Property name="saiku.olap.query.nonempty.rows" value="true" />
<Property name="org.saiku.query.explain" value="true" />
<Property name="org.saiku.connection.scenario" value="false" />
<Property name="saiku.ui.render.mode" value="table" />
<Property name="saiku.olap.query.nonempty.columns" value="true" />
<Property name="saiku.olap.query.drillthrough" value="true" />
<Property name="saiku.olap.query.automatic_execution" value="true" />
</Properties>
</Query>
open custom query without create a file (Saiku lib reference js/saiku/models/Repository.js):
var mq = new Query({ xml: '<Query name="C25E54AB-780D-AA9D-BCA8-260C267EE787" type="QM" connection="MYSQL_TEST" cube="[Pedidos]" catalog="MYSQL_TEST" schema="MYSQL_TEST"> <QueryModel> <Axes> <Axis location="ROWS" nonEmpty="true"> <Dimensions> <Dimension name="Filial" hierarchizeMode="PRE" hierarchyConsistent="true"> <Inclusions> <Selection dimension="Filial" type="level" node="[Filial].[Filial (Codigo)]" operator="MEMBERS" /> </Inclusions> <Exclusions /> </Dimension> </Dimensions> </Axis> <Axis location="COLUMNS" nonEmpty="true"> <Dimensions> <Dimension name="Measures" hierarchizeMode="PRE" hierarchyConsistent="true"> <Inclusions> <Selection dimension="Measures" type="member" node="[Measures].[Volume Vendas]" operator="MEMBER" /> </Inclusions> <Exclusions /> </Dimension> </Dimensions> </Axis> <Axis location="FILTER" nonEmpty="false" /> </Axes> </QueryModel> <MDX>SELECT NON EMPTY {Hierarchize({[Measures].[Volume Vendas]})} ON COLUMNS, NON EMPTY {Hierarchize({[Filial].[Filial (Codigo)].Members})} ON ROWS FROM [Pedidos]</MDX> <Totals /> <Properties> <Property name="saiku.ui.render.mode" value="table" /> <Property name="org.saiku.query.explain" value="true" /> <Property name="saiku.olap.query.nonempty.columns" value="true" /> <Property name="saiku.olap.query.nonempty.rows" value="true" /> <Property name="org.saiku.connection.scenario" value="false" /> <Property name="saiku.olap.query.automatic_execution" value="true" /> <Property name="saiku.olap.query.drillthrough" value="true" /> <Property name="saiku.olap.query.filter" value="true" /> <Property name="saiku.olap.query.limit" value="true" /> <Property name="saiku.olap.query.nonempty" value="true" /> </Properties> </Query>', formatter: Settings.CELLSET_FORMATTER}, { name: 'testaa'});
var tab = Saiku.tabs.add(new Workspace({ query: mq }));
var mq = new Query({ xml: '<Query name="C25E54AB-780D-AA9D-BCA8-260C267EE787" type="MDX" connection="MYSQL_TEST" cube="[Pedidos]" catalog="MYSQL_TEST" schema="MYSQL_TEST"> <MDX>SELECT NON EMPTY {Hierarchize({[Measures].[Volume Vendas]})} ON COLUMNS, NON EMPTY {Hierarchize({[Filial].[Filial (Codigo)].Members})} ON ROWS FROM [Pedidos]</MDX> <Totals /> <Properties> <Property name="saiku.ui.render.mode" value="table" /> <Property name="org.saiku.query.explain" value="true" /> <Property name="saiku.olap.query.nonempty.columns" value="true" /> <Property name="saiku.olap.query.nonempty.rows" value="true" /> <Property name="org.saiku.connection.scenario" value="false" /> <Property name="saiku.olap.query.automatic_execution" value="true" /> <Property name="saiku.olap.query.drillthrough" value="true" /> <Property name="saiku.olap.query.filter" value="true" /> <Property name="saiku.olap.query.limit" value="true" /> <Property name="saiku.olap.query.nonempty" value="true" /> </Properties> </Query>', formatter: Settings.CELLSET_FORMATTER}, { name: 'testaa'});
var tab = Saiku.tabs.add(new Workspace({ query: mq }));