I'm using the latest Saiku 3.8.3 standalone and I'm having some problems using the database PostgreSQL 9.1 with different schemas then PUBLIC.
I made the datasource and it connected correctly, here is the data source I'm using without personal details:
type=OLAP
name=chegadaturistas
driver=mondrian.olap4j.MondrianOlap4jDriver
location=jdbc:mondrian:Jdbc=jdbc:postgresql://DBNAME:PORT/DB;Catalog=mondrian:///datasources/chegada_turistas.xml;JdbcDrivers=org.postgresql.Driver;
username=postgres
password=PASSWORD
security.enabled=false
I've also created the Mondrian Schema with Legacy option cause I've used Schema Workbench and it seems to be normal without any problem. Here is part of it for an example
<Schema name="DEPES" description="DEPES">
<Cube name="CHEGADAS" visible="true" cache="true" enabled="true">
<Table name="chegada" schema="fato" alias="chegada">
</Table>
<Dimension type="StandardDimension" visible="true" foreignKey="id_tempo" highCardinality="false" name="Ano">
<Hierarchy name="ANO" visible="true" hasAll="true" allMemberName="Todos os Anos" primaryKey="id_tempo">
<Table name="tempo" schema="dimensao" alias="Tempo">
</Table>
<Level name="ANO" visible="true" column="nu_ano" nameColumn="nu_ano" ordinalColumn="nu_ano" type="Integer" uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" foreignKey="id_origem" highCardinality="false" name="Origem">
<Hierarchy name="Origem" visible="true" hasAll="true" allMemberName="Todas as Origens" primaryKey="id_origem">
<Table name="origem" schema="dimensao">
</Table>
<Level name="Continente" visible="true" column="no_continente" nameColumn="no_continente" ordinalColumn="no_continente" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="Pais" visible="true" column="no_pais" nameColumn="no_pais" ordinalColumn="no_pais" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
......
The problem is, when I run Saiku I can't see the schema and it has this error in log:
2016-04-08 08:17:31,976 WARN [mondrian.rolap.RolapSchema] Model is in legacy format
2016-04-08 08:17:36,725 ERROR [org.saiku.web.core.SecurityAwareConnectionManager] Error connecting: chegadaturistas
mondrian.olap.MondrianException: Mondrian Error:Internal error: Reading row count from table [null, null, tempo]; sql=[select count(*) from "tempo"]
So I noticed the select used by mondrian in the COUNT was with just the table and not the schema.table ("dimensao"."tempo" in this case instead of only "tempo") that should be used on PostgreSQL. To get sure I created a VIEW in PostgreSQL public schema with the name "tempo" and it didn't give me this error in the "tempo" table, but gave me on another. Is there a way to force Mondrian to use the SCHEMA.TABLE on the selects for PosgreSQL instead of using only the PUBLIC schema?
There's certainly no problem with schema usage, but I suspect you're using a mondrian 3 schema on saiku standalone which uses mondrian 4. Behind the scenes it upgrades your schema and my guess is it's ignoring the schema attribute.
If that is the case. The easy solution would be to uncomment the mondrian block in log4j.xml and copy out the mondrian 4 schema and just add the schema attribute manually
--
You received this message because you are subscribed to the Google Groups "Saiku Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@saiku.meteorite.bi.
To unsubscribe from this group and stop receiving emails from it, send an email to d...@saiku.meteorite.bi.
--
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@saiku.meteorite.bi.