【发布时间】:2019-07-10 12:01:06
【问题描述】:
我有一个带有“个人”的蒙德里安立方体。我需要添加与每个人相关的两个类别,以及这些类别的概率数值。此数据位于新维度“类别”中。数据来自 Postgres 9 Materialized View,概率在 Postgres 中属于“数字”类型。
但是,当我尝试将数据显示为“数字”时,根本不会显示具有十进制值的行。
如果我将概率取为百分比并对它们的值进行四舍五入,那么所有行都会正确显示。
<Dimension name="Categories">
<Hierarchy name="Category1" visible="true" hasAll="true" primaryKey="id" caption="Categories">
<Table name="individuals_mv" schema="public"/>
<Level approxRowCount="6000" name="Category1" visible="true" column="category_1" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never"/>
</Hierarchy>
<Hierarchy name="CategoryProbability1" visible="true" hasAll="true" primaryKey="id" caption="Categories">
<Table name="individuals_mv" schema="public"/>
<Level approxRowCount="6000" name="CategoryProb1" visible="true" column="category_prob_1" type="Numeric" uniqueMembers="false" levelType="Regular" hideMemberIf="Never"/>
</Hierarchy>
<Hierarchy name="Category2" visible="true" hasAll="true" primaryKey="id" caption="Categories">
<Table name="individuals_mv" schema="public"/>
<Level approxRowCount="6000" name="Category2" visible="true" column="category_2" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never"/>
</Hierarchy>
<Hierarchy name="CategoryProbability2" visible="true" hasAll="true" primaryKey="id" caption="Categories">
<Table name="individuals_mv" schema="public"/>
<Level approxRowCount="6000" name="CategoryProb2" visible="true" column="category_prob_2" type="Numeric" uniqueMembers="false" levelType="Regular" hideMemberIf="Never"/>
</Hierarchy>
</Dimension>
individuals_mv的内容:
individual category_1 category_prob_1 category_2 category_prob_2
61411120 [NULL] [NULL] [NULL] [NULL]
10658560 [NULL] [NULL] [NULL] [NULL]
60652135 [NULL] [NULL] [NULL] [NULL]
10657820 "C1" 0.32846 "C3" 0.1957235187
60873351 "C1" 0.33012354 "C2" 0.2763309777
61399718 [NULL] [NULL] [NULL] [NULL]
61378272 [NULL] [NULL] [NULL] [NULL]
61378554 [NULL] [NULL] [NULL] [NULL]
报告输出:
Individual Category1 CategoryProb1 Category2 CategoryProb2
"10658560" "Not Available" "Not Available" "Not Available" "Not Available"
"60652135" "Not Available" "Not Available" "Not Available" "Not Available"
"61378272" "Not Available" "Not Available" "Not Available" "Not Available"
"61378554" "Not Available" "Not Available" "Not Available" "Not Available"
"61399718" "Not Available" "Not Available" "Not Available" "Not Available"
"61411120" "Not Available" "Not Available" "Not Available" "Not Available"
【问题讨论】:
标签: postgresql pentaho hierarchy cube mondrian