为此,我使用的是默认的模式/例如从Oracle OLAP下载部分GLOBAL 。
这是从Oracle OLAP的Java引导代码的修改后的版本:
MdmCube unitsCube =
(MdmCube)mdmDBSchema.getTopLevelObject("PRICE_CUBE_AWJ");
MdmBaseMeasure mdmUnits =
(MdmBaseMeasure)unitsCube.getMeasure("UNIT_PRICE");
NumberSource units = (NumberSource)mdmUnits.getSource();
MdmPrimaryDimension mdmPRODDim = (MdmPrimaryDimension)mdmDBSchema.getTopLevelObject("PRODUCT_AWJ");
MdmLevelHierarchy mdmPRODHier = (MdmLevelHierarchy)mdmPRODDim.getDefaultHierarchy();
StringSource custHier = (StringSource)mdmPRODHier.getSource();
StringSource prodHier = (StringSource)mdmPRODHier.getSource();
Source famSel =
prodHier.selectValues(new String[] {"PRODUCT_PRIMARY::FAMILY::ACC",
"PRODUCT_PRIMARY::FAMILY::OS"});
Source querySource2 = units.join(timeSel).join(famSel).join(mdmPRODHier.getSource());
上述查询的结果是一个笛卡尔乘积,并且每个家庭与每个产品的层次结构匹配:
7: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::ACC--------CALENDAR_YEAR::YEAR::CY1999--------*35.99375*--------)
8: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::ACC--------CALENDAR_YEAR::YEAR::CY2000--------*32.9807070707071*--------)
9: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::ACC--------CALENDAR_YEAR::YEAR::CY2001--------*36.8141666666667*--------)
10: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::OS--------CALENDAR_YEAR::YEAR::CY1999--------*58.3433333333333*--------)
11: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::OS--------CALENDAR_YEAR::YEAR::CY2000--------*62.113125*--------)
12: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::OS--------CALENDAR_YEAR::YEAR::CY2001--------*65.7258333333333*--------)
我们可以在这里看到它确实与ACC(附件)匹配的HRD(硬件)的,它有一个价值,但不应该有,因为ACC属于类SFT(软件)。请参阅附件截图以供参考。
有没有一种方法,使排斥,以至于当我加入这两个来源,只显示了这是可能的值,在这种情况下,该ACC只会在SFT类下显示为在屏幕截图的意义。
欢迎所有帮助,
谢谢。
2011-04-19
Adnan