Calculation Scripts:- Session 10


Data Blocks:

In Block Storage databases, Essbase uses two types of structure to store data:

1. Data Blocks

2. Index Blocks

Lets go in flashback. We all know that the dimensions can be categorized in sparse and dense 

type and data is not stored for a member but its stored at a member combination. In our 

application we have 5 dimensions, which are of type:





"The number of stored members in Dense Dimensions will contribute in defining blocksize"

Stored Members in Accounts * Stored Members in Period * 8 will be the block size in Bytes

13*19*8 = 1976 Bytes will be our block size

"The number of stored members in sparse Dimensions will help us in finding potential number of blocks"

Potential Number of Blocks = Stored Members in Entity * Stored Members in Year * Stored Members in Scenario; 

13*6*4= 312;



Lets clear all data of our cube and check the statistics, to check the statistics: Right click on database->Edit->Properties





If you will notice, the block size here is 1976 bytes, Potential number of blocks is 312 as we 


have calculated above and because we have cleared all data from this cube existing number of 

blocks are 0. Lets lock and send below data to the Essbase cube and check the statistics:






































Now why the existing number of block and level 0 blocks increased to 1 ?



To answer this let check at which combination this data is stored in Essbase:

Budget->Fy10->APAC1->Jan->GrossSales = 12300 

Budget->Fy10->APAC1->Feb->GrossSales = 12400

Budget->Fy10->APAC1->Mar->GrossSales = 21300



Budget,Fy10, APAC1 these there members are from sparse dimensions, they will make an 

entry in index file and every entry in an index file has a data file associated with it. Though 

Essbase has it own format for index and data file but for understanding lets assume that below 

is the format:





What if we have following data in the Essbase:




Budget->Fy10->APAC1->Jan->GrossSales = 12300 

Budget->Fy10->APAC1->Feb->GrossSales = 12400

.

.

.

Budget->Fy10->APAC1->Dec->GrossSales = 14100

Budget->Fy10->APAC1->Jan->ThirdParty = 5000

Budget->Fy10->APAC1->Feb->ThirdParty = 5025

.

.

.

Budget->Fy10->APAC1->Dec->ThirdParty = 5275

.

.

.

Budget->Fy10->APAC1->Dec->OverHead = 475





Still for all the combination the sparse member combination is same so there is no need to 

have an extra entry in the index file just the data associated with this combination needs to be 

modified.



Now lets assume if you lock and send these values to Essbase:




Now the combination at which data will be stored:

Budget->Fy10->APAC1->Jan->GrossSales = 12300 

Budget->Fy10->APAC1->Feb->GrossSales = 12400

Budget->Fy10->APAC1->Mar->GrossSales = 21300

Budget->Fy10->APAC1->Apr->GrossSales = 14000

Budget->Fy10->APAC2->Jan->GrossSales = 12300 

Budget->Fy10->APAC2->Feb->GrossSales = 12400

Budget->Fy10->APAC2->Mar->GrossSales = 21300

Budget->Fy10->APAC2->Apr->GrossSales = 17000



Now for first four data entries we have the same set of sparse dim combination (Budget,Fy10, APAC1) and this combination is already a part of index file but the next four data entries are for Budget,Fy10, APAC2 so there will be one more entry in the index file and this will point to a new data block in the data file.




If you look at the statistics



Its a bit complicated for beginners, if you have any question on this please feel free to shoot.

Cheers..!!! 
Rahul S.

Comments

Popular posts from this blog

Multiple Navigation Flows are Active

The Member Does Not Exists For The Specified Cube

"Smart View handled an unknown exception thrown by Microsoft Office" Error on Vista, Windows 7, Windows 2008