Cube Modeling Question

Post Reply
ABRANDE
Posts: 7
Joined: Fri Apr 09, 2010 8:21 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2003

Cube Modeling Question

Post by ABRANDE »

DB Environment: Oracle 11G
TM1 v. 9.5 on Windows

Question: How to create a Cube based on existing cubes by selecting all data from one cube and the latest corresponding values from another(I will have to find the latest corresponding value for each row of data, not for the whole set)?

I have a fact table (see attachment) which contains 2 grains of data – quarterly liability data and daily market data. Liabilities include Market data, but Market data run does not include Liabilities. I understand the table design issue, and would consider splitting the table only as the last resort, if all fails, as the work involved in splitting is quite extensive….

What I need to do is - create the Liability Cube with all liabilities’ data, then create an Asset Cube with all assets’ data and then create a consolidated Liability+Asset cube, which should contain All Liability’s data for one date(quarter-end) and the latest’s Asset data for maximum reported date for each row or combination of PortfolioID, CompanyID, ProductID.
As the table is quite large, might contain 15+ million records – doing the Left Outer Join on itself proofs to be insufficient, this is the SQL, which I am looking to replicate in TM1, by joining Liability and Assets Cubes.

SQL:
SELECT
LIABILITY.LIABILITYRUNDATE,
ASSET.ASSET_BOOKVALUE,
LIABILITY.LIABLITY_RESULTVALUE,
LIABILITY.PORTFOLIOID,
LIABILITY.COMPANYID,
LIABILITY.PRODUCTID,
RANK() OVER(PARTITION BY LIABILITY.PORTFOLIOID, LIABILITY.COMPANYID, LIABILITY.PRODUCTID ORDER BY ASSET.ASSETRUNDATE DESC) RANK
FROM ASSET_LIABILITY_FACT LIABILITY
LEFT OUTER JOIN ASSET_LIABILITY_FACT ASSETS ON LIABILITY.PORTFOLIOID =
ASSET.PORTFOLIOID
AND LIABILITY.COMPANYID =
ASSET.COMPANYID
AND LIABILITY.PRODUCTID =
ASSET.PRODUCTID
WHERE LIABILITY.LIABILITYRUNDATE = '03/31/2010'

Thanks,
Anna
Attachments
ASSET_LIABILITY_FACT_TABLE_DATA.doc
Table structure and sample data
(41 KiB) Downloaded 183 times
Post Reply