Cognos FM snowflake or star schema? Help with hierarchies needed
I need some help with m开发者_如何学运维odeling in Cognos Framework Manager 8.4. Given following schema
where
- F_sales.order_key references D_order.sid
- D_orderItems.orderID references D_order.OrderID
- D_productAttributes.OrderItemID references D_orderItems.orderItemsID
When creating reports via Cognos Report Studio I am not able to filter for orders which have orderItems which have attributeKey e.g. 'shippingType' and attributeValue 'Standard' or 'Express' or whatever.
I guess the problem is the quasi m:n relationship. In practice this shouldn't be a problem. So I thought a solution would be to create a regular dimension in framework manager with a hierarchy like "An order can consist of multiple order items and each order item has multiple attributeKeys and -values"
Is this the solution and how would I do that? Can someone guide me, please?
Or is it okay like it is and I am missing something in Report Studio? In my test I just created a list which has the facts from fact table and orderID from D_order. Filtering for everything else works fine, but there is no effect when filtering for e.g. D_productAttributes.attributeValue = 'Express'
Thanks in advance.
Problem solved. The answer is not regular dimension and hierarchy. It works when I leave the relationships as they are and create model query subjects. No determinants needed. I created one model query subject for orderItems with
- D_order.sid
- D_order.orderID
- D_orderItems.orderItemsID
- ...(everything else I need from D_orderItems)
Same for D_productAttributes, but with
- D_order.sid
- D_order.orderID
- D_orderItems.orderItemsID
- D_productAttributes.attributeKey
- D_productAttributes.attributeValue
Then I joined the two model query subjects to my fact table via sid. When creating the package for building reports I leave D_orderItems and D_productAttributes completely out, so they are not visible in report studio. Works like a charm.
精彩评论