Saiku查询显示没有数据
Posted
技术标签:
【中文标题】Saiku查询显示没有数据【英文标题】:Saiku query shows no data 【发布时间】:2017-02-22 15:23:40 【问题描述】:所以,我在我的 debian8 服务器上安装了 pentaho bi 服务器。然后设法在上面安装saiku。现在,我已经使用workbench制作了一个立方体并将其发布到服务器上。
问题是:当我访问 saiku 查询时,我确实可以加载我发布的多维数据集,但是当我尝试导航它时,即在列和行中建立度量和某些维度字段时,没有数据显示!
我知道数据库不是空的,非常感谢。这是 fact_table,如果有帮助的话(当然,维度有显示的 id 加上它们自己的数据):
CREATE TABLE sc_fact_avi.fact_avi
(
id_fact bigserial NOT NULL,
id_empresa smallint,
id_cliente integer,
id_segmento bigint,
id_usuario bigint,
id_campana bigint,
id_resultado smallint,
id_telefono bigint,
id_fecha_llamada integer,
id_canal integer,
id_geografia integer,
id_hora_llamada integer,
id_hora_contestacion integer,
id_hora_inicio_asr integer,
id_hora_fin_asr integer,
id_hora_fin_llamada integer,
id_respuesta_p1 smallint,
id_respuesta_p2 smallint,
id_respuesta_p3 smallint,
id_respuesta_p4 smallint,
id_respuesta_p5 smallint,
id_respuesta_p6 smallint,
id_respuesta_p7 smallint,
id_respuesta_p8 smallint,
id_respuesta_p9 smallint,
id_respuesta_p10 smallint,
id_respuesta_p11 smallint,
id_respuesta_p12 smallint,
id_respuesta_p13 smallint,
id_respuesta_p14 smallint,
id_respuesta_p15 smallint,
link_grabacion character varying,
intento character(1),
cant_llamadas smallint DEFAULT 1,
CONSTRAINT pk_id_fact PRIMARY KEY (id_fact),
CONSTRAINT fk_id_campana FOREIGN KEY (id_campana)
REFERENCES sc_dim_avi.dim_campana (id_campana) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_canal FOREIGN KEY (id_canal)
REFERENCES sc_dim_avi.dim_canal (id_canal) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_cliente FOREIGN KEY (id_cliente)
REFERENCES sc_dim_avi.dim_cliente (id_cliente) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_empresa FOREIGN KEY (id_empresa)
REFERENCES sc_dim_avi.dim_empresa (id_empresa) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_fecha FOREIGN KEY (id_fecha_llamada)
REFERENCES sc_dim_avi.dim_fecha (id_fecha) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_fin_asr FOREIGN KEY (id_hora_fin_asr)
REFERENCES sc_dim_avi.dim_hora (id_hora) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_geografia FOREIGN KEY (id_geografia)
REFERENCES sc_dim_avi.dim_geografia (id_geografia) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_hora_fin_llamada FOREIGN KEY (id_hora_fin_llamada)
REFERENCES sc_dim_avi.dim_hora (id_hora) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_hora_llamada FOREIGN KEY (id_hora_llamada)
REFERENCES sc_dim_avi.dim_hora (id_hora) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_llamada_contestacion FOREIGN KEY (id_hora_contestacion)
REFERENCES sc_dim_avi.dim_hora (id_hora) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p1 FOREIGN KEY (id_respuesta_p1)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p10 FOREIGN KEY (id_respuesta_p10)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p11 FOREIGN KEY (id_respuesta_p11)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p12 FOREIGN KEY (id_respuesta_p12)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p13 FOREIGN KEY (id_respuesta_p13)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p14 FOREIGN KEY (id_respuesta_p14)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p15 FOREIGN KEY (id_respuesta_p15)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p2 FOREIGN KEY (id_respuesta_p2)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p3 FOREIGN KEY (id_respuesta_p3)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p4 FOREIGN KEY (id_respuesta_p4)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p5 FOREIGN KEY (id_respuesta_p5)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p6 FOREIGN KEY (id_respuesta_p6)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p7 FOREIGN KEY (id_respuesta_p7)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p8 FOREIGN KEY (id_respuesta_p8)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_respuesta_p9 FOREIGN KEY (id_respuesta_p9)
REFERENCES sc_dim_avi.dim_respuesta (id_respuesta) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_resultado_funcional FOREIGN KEY (id_resultado)
REFERENCES sc_dim_avi.dim_resultado (id_resultado) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_segmento FOREIGN KEY (id_segmento)
REFERENCES sc_dim_avi.dim_segmento (id_segmento) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_telefono FOREIGN KEY (id_telefono)
REFERENCES sc_dim_avi.dim_telefono (id_telefono) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk_id_usuario FOREIGN KEY (id_usuario)
REFERENCES sc_dim_avi.dim_usuario (id_usuario) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT if_id_hora_inicio_asr FOREIGN KEY (id_hora_inicio_asr)
REFERENCES sc_dim_avi.dim_hora (id_hora) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
OIDS=FALSE
)
TABLESPACE ts_fact_avi;
ALTER TABLE sc_fact_avi.fact_avi
OWNER TO desarrollo;
我已经尝试从工作台多次修改多维数据集,但没有任何效果。在这里,我知道它不完整,但如果它不能仅用于几个表,那么所有这些表将如何处理(或者我可能调用了错误的字段?):
<Schema name="Schema_cubo">
<Dimension type="StandardDimension" visible="true" highCardinality="false" name="Campana">
<Hierarchy name="jerarquiaCampana" visible="true" hasAll="true" primaryKey="id_campana">
<Table name="dim_campana" schema="sc_dim_avi">
</Table>
<Level name="Campanas" visible="true" column="cd_campana" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" highCardinality="false" name="Cliente">
<Hierarchy name="jerarquiaCliente" visible="true" hasAll="true" primaryKey="id_cliente">
<Table name="dim_cliente" schema="sc_dim_avi">
</Table>
<Level name="Cliente" visible="true" column="cd_cliente" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Cube name="Cubo_reporteadorprueba" visible="true" cache="true" enabled="true">
<Table name="fact_avi" schema="sc_fact_avi">
</Table>
<DimensionUsage source="Campana" name="Campana" visible="true" foreignKey="id_campana" highCardinality="false">
</DimensionUsage>
<DimensionUsage source="Cliente" name="Cliente" visible="true" foreignKey="id_cliente" highCardinality="false">
</DimensionUsage>
<Measure name="Cantidad_llamadas" column="cant_llamadas" datatype="Integer" aggregator="sum" visible="true">
</Measure>
</Cube>
</Schema>
卸载并重新安装saiku,但没有。我不确定是否可能只是可能,pentaho bi 服务器可能没有正确安装。
是不是因为表空间不同?不同的模式?帮助! 感谢您的回复和您的时间。
编辑
我更改了立方体(现在显示的代码),现在它甚至不会显示在 saiku 的选择立方体选项中:/
【问题讨论】:
【参考方案1】:事实证明,最新版本的 Pentaho BI 服务器与 Saiku 不兼容。我安装了以前的稳定版本,现在 saiku 查询显示数据。
【讨论】:
以上是关于Saiku查询显示没有数据的主要内容,如果未能解决你的问题,请参考以下文章
分析视图中的多维数据集未在 Saiku Analytics 中显示
saiku 显示中文出现乱码,显示维度和度量时中文乱码,但是查询结果是正确的,求解答!!急!!谢谢