dbTalk Databases Forums  

Source Code for PartAggUtil.exe (Partition Manager)

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Source Code for PartAggUtil.exe (Partition Manager) in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Polaris
 
Posts: n/a

Default Source Code for PartAggUtil.exe (Partition Manager) - 08-13-2003 , 03:49 PM






Hi:

Below is the source code for Partition Manager from Microsoft SQL Server
Accelerator for BI. It is creating aggregations defined by the user in a big
multi-column listbox. For each new partition, it loop through all its
dimensions and then add level into the dimension.

The problem is that I do not understand why multiple levels are added into a
dimension? Should it be only a single level selected by the user be used by
the aggregation? I would appriciate if anyone understand the code can
explain.

Thanks

----------------------------------------------------------------------------
--
'Create new aggregations
For aggCounter = 0 To lstAgg(0).ListItems.Count - 1
Set dsoAgg = m_dsoPart.MDStores.AddNew("CustomAgg" &
CStr(aggCounter))
dsoAgg.IsDefault = True
For dimCounter = 0 To numDims - 1
Set dsoAggDim = dsoAgg.Dimensions(lblDimName(dimCounter))
For levCounter = 1 To
imgCmbLevs(dimCounter).ComboItems(lstAgg(dimCounte r).ListItems(aggCounter +
1).Text).Index
If Not
imgCmbLevs(dimCounter).ComboItems(levCounter).Inde x = 1 Then // WHY NOT ONLY
ONE LEVEL ?
dsoAggDim.Levels.AddNew
imgCmbLevs(dimCounter).ComboItems(levCounter)
End If
Next
Next
Next



Reply With Quote
  #2  
Old   
Polaris
 
Posts: n/a

Default Re: Source Code for PartAggUtil.exe (Partition Manager) - 08-13-2003 , 05:50 PM






I think its adding levels UPTO the point where you want to aggregate.

"Polaris" <etpolaris (AT) hotmail (DOT) com> wrote

Quote:
Hi:

Below is the source code for Partition Manager from Microsoft SQL Server
Accelerator for BI. It is creating aggregations defined by the user in a
big
multi-column listbox. For each new partition, it loop through all its
dimensions and then add level into the dimension.

The problem is that I do not understand why multiple levels are added into
a
dimension? Should it be only a single level selected by the user be used
by
the aggregation? I would appriciate if anyone understand the code can
explain.

Thanks

--------------------------------------------------------------------------
--
--
'Create new aggregations
For aggCounter = 0 To lstAgg(0).ListItems.Count - 1
Set dsoAgg = m_dsoPart.MDStores.AddNew("CustomAgg" &
CStr(aggCounter))
dsoAgg.IsDefault = True
For dimCounter = 0 To numDims - 1
Set dsoAggDim = dsoAgg.Dimensions(lblDimName(dimCounter))
For levCounter = 1 To
imgCmbLevs(dimCounter).ComboItems(lstAgg(dimCounte r).ListItems(aggCounter
+
1).Text).Index
If Not
imgCmbLevs(dimCounter).ComboItems(levCounter).Inde x = 1 Then // WHY NOT
ONLY
ONE LEVEL ?
dsoAggDim.Levels.AddNew
imgCmbLevs(dimCounter).ComboItems(levCounter)
End If
Next
Next
Next





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.