PDA

View Full Version : problem with Postgres



sebabuso
11-05-2003, 04:25 AM
Hello!!
the structure of the data base in Postgres is:
Server(Postgres)
....Database_1
....Database_2
.........Schema_1
................Tables
.........Schema_2
................Table_X
......................Fields
................Table_Y
......................Field1
......................Field2
......................Field3
good.
and, in the file xml that it defines the scheme of the
cube I have the following thing:
<Table name="SCHEMA.TABLE"/>
and
<Level column="FIELD" name="xxxx"
table="SCHEMA.TABLE" uniqueMembers="true"/>
but it gives back an error
because in the SQL generated by Mondrian assigns the
alias to the Databases like "SCHEMA"."TABLE"
where it must be single "TABLE"
it can be?
that I must do?
thanks for all !!
Sebastian.
(sorry for my english)

jankoh
11-05-2003, 06:56 AM
You don't have to name schema. User parameter in mondrian connection to postgres defines which schemas can mondrian access. Just use table names without SCHEMA.

jhyde
11-05-2003, 08:57 AM
Also, note that the <Table> element has a 'schema' attribute. Hence:
<Table schema="SCHEMA_1" name="TABLE" alias="S1T"/>
<Level column="FIELD" name="xxxx" table="S1T" uniqueMembers="true"/>
Note that Level.table refers to the table's alias field (S1T), so potentially you could use tables with the same name in different schemas, or even use the same table twice.