dbTalk Databases Forums  

programming an AggregationDesign with AMO?

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


Discuss programming an AggregationDesign with AMO? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
vagle@hsr.no
 
Posts: n/a

Default programming an AggregationDesign with AMO? - 11-14-2006 , 05:38 AM






have anyone done this before? appreciate some tips. My AMO code does
create some aggegation elements in cube partition but I'm not sure it's
enough.

Is this code enough if I only want to set the percentage?

ag = new AggregationDesign("ad");
ag.EstimatedPerformanceGain = 42;
myMeasureGroup.AggregationDesigns.Add(ag);
myPartition.Annotations.Add("AggregationPercent",
"42");
myPartition.AggregationDesignID = "ad";

It does create cube with XML showing <AggregationDesign> with ID of
"ad" and from <Partition> a link to this with
<AggregationDesignID>ad</AggregationDesignID>.
What is different from the XMLA created by my AMO code and the XMLA
made from me manually create aggregationdesign is that these things are
missing in XMLA made by AMO code:
the <EstimatedCount>2</EstimatedCount> in dimensions and
<EstimatedRows>2385</EstimatedRows> in <partition>.

IS IT STILL OK?

<Partitions>
<Partition>
<ID>...</ID>
<Name>...</Name>
<Annotations>
<Annotation>
<Name>AggregationPercent</Name>
<Value>42</Value>
</Annotation>
</Annotations>
<Source xsi:type="DsvTableBinding">

<DataSourceViewID>...</DataSourceViewID>
<TableID>...</TableID>
</Source>
<StorageMode>Molap</StorageMode>
<ProcessingMode>Regular</ProcessingMode>
<ProactiveCaching>

<SilenceInterval>-PT1S</SilenceInterval>
<Latency>-PT1S</Latency>

<SilenceOverrideInterval>-PT1S</SilenceOverrideInterval>

<ForceRebuildInterval>-PT1S</ForceRebuildInterval>
<Source
xsi:type="ProactiveCachingInheritedBinding" />
</ProactiveCaching>

<AggregationDesignID>ad</AggregationDesignID>
</Partition>
</Partitions>
<AggregationDesigns>
<AggregationDesign>
<ID>ad</ID>
<Name>ad</Name>
<Dimensions>
<Dimension>

<CubeDimensionID>currency</CubeDimensionID>
<Attributes>
<Attribute>

<AttributeID>currency-KEY</AttributeID>
</Attribute>
<Attribute>

<AttributeID>Currency</AttributeID>
</Attribute>
</Attributes>
</Dimension>


(yes I have posted this to two news groups :-)


Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: programming an AggregationDesign with AMO? - 11-14-2006 , 06:59 AM






This code create an empty aggregationdesign without any aggregation stored
in.
changing the estimatedperformancegain value don't create 42% of
aggregations.

take a look at this sample:
http://msdn2.microsoft.com/en-US/library/ms345091.aspx
(the latest sample code design the aggregations)


<vagle (AT) hsr (DOT) no> wrote

Quote:
have anyone done this before? appreciate some tips. My AMO code does
create some aggegation elements in cube partition but I'm not sure it's
enough.

Is this code enough if I only want to set the percentage?

ag = new AggregationDesign("ad");
ag.EstimatedPerformanceGain = 42;
myMeasureGroup.AggregationDesigns.Add(ag);
myPartition.Annotations.Add("AggregationPercent",
"42");
myPartition.AggregationDesignID = "ad";

It does create cube with XML showing <AggregationDesign> with ID of
"ad" and from <Partition> a link to this with
AggregationDesignID>ad</AggregationDesignID>.
What is different from the XMLA created by my AMO code and the XMLA
made from me manually create aggregationdesign is that these things are
missing in XMLA made by AMO code:
the <EstimatedCount>2</EstimatedCount> in dimensions and
EstimatedRows>2385</EstimatedRows> in <partition>.

IS IT STILL OK?

Partitions
Partition
ID>...</ID
Name>...</Name
Annotations
Annotation
Name>AggregationPercent</Name
Value>42</Value
/Annotation
/Annotations
Source xsi:type="DsvTableBinding"

DataSourceViewID>...</DataSourceViewID
TableID>...</TableID
/Source
StorageMode>Molap</StorageMode
ProcessingMode>Regular</ProcessingMode
ProactiveCaching

SilenceInterval>-PT1S</SilenceInterval
Latency>-PT1S</Latency

SilenceOverrideInterval>-PT1S</SilenceOverrideInterval

ForceRebuildInterval>-PT1S</ForceRebuildInterval
Source
xsi:type="ProactiveCachingInheritedBinding" /
/ProactiveCaching

AggregationDesignID>ad</AggregationDesignID
/Partition
/Partitions
AggregationDesigns
AggregationDesign
ID>ad</ID
Name>ad</Name
Dimensions
Dimension

CubeDimensionID>currency</CubeDimensionID
Attributes
Attribute

AttributeID>currency-KEY</AttributeID
/Attribute
Attribute

AttributeID>Currency</AttributeID
/Attribute
/Attributes
/Dimension


(yes I have posted this to two news groups :-)


Reply With Quote
  #3  
Old   
Acius
 
Posts: n/a

Default Re: programming an AggregationDesign with AMO? - 11-14-2006 , 05:33 PM



I'm confused.
If I do something like
myPartition.Annotations.Add("AggregationPercent", "42")
It shows up as Molap 42% and has a size of 173 KB (obviously nothing under
rows).
It looks like it's worked .. how do you tell if there are really
aggregations present?

Thanks

"Jéjé" wrote:

Quote:
This code create an empty aggregationdesign without any aggregation stored
in.
changing the estimatedperformancegain value don't create 42% of
aggregations.

take a look at this sample:
http://msdn2.microsoft.com/en-US/library/ms345091.aspx
(the latest sample code design the aggregations)


vagle (AT) hsr (DOT) no> wrote in message
news:1163504292.215161.199280 (AT) m73g2000cwd (DOT) googlegroups.com...
have anyone done this before? appreciate some tips. My AMO code does
create some aggegation elements in cube partition but I'm not sure it's
enough.

Is this code enough if I only want to set the percentage?

ag = new AggregationDesign("ad");
ag.EstimatedPerformanceGain = 42;
myMeasureGroup.AggregationDesigns.Add(ag);
myPartition.Annotations.Add("AggregationPercent",
"42");
myPartition.AggregationDesignID = "ad";

It does create cube with XML showing <AggregationDesign> with ID of
"ad" and from <Partition> a link to this with
AggregationDesignID>ad</AggregationDesignID>.
What is different from the XMLA created by my AMO code and the XMLA
made from me manually create aggregationdesign is that these things are
missing in XMLA made by AMO code:
the <EstimatedCount>2</EstimatedCount> in dimensions and
EstimatedRows>2385</EstimatedRows> in <partition>.

IS IT STILL OK?

Partitions
Partition
ID>...</ID
Name>...</Name
Annotations
Annotation
Name>AggregationPercent</Name
Value>42</Value
/Annotation
/Annotations
Source xsi:type="DsvTableBinding"

DataSourceViewID>...</DataSourceViewID
TableID>...</TableID
/Source
StorageMode>Molap</StorageMode
ProcessingMode>Regular</ProcessingMode
ProactiveCaching

SilenceInterval>-PT1S</SilenceInterval
Latency>-PT1S</Latency

SilenceOverrideInterval>-PT1S</SilenceOverrideInterval

ForceRebuildInterval>-PT1S</ForceRebuildInterval
Source
xsi:type="ProactiveCachingInheritedBinding" /
/ProactiveCaching

AggregationDesignID>ad</AggregationDesignID
/Partition
/Partitions
AggregationDesigns
AggregationDesign
ID>ad</ID
Name>ad</Name
Dimensions
Dimension

CubeDimensionID>currency</CubeDimensionID
Attributes
Attribute

AttributeID>currency-KEY</AttributeID
/Attribute
Attribute

AttributeID>Currency</AttributeID
/Attribute
/Attributes
/Dimension


(yes I have posted this to two news groups :-)



Reply With Quote
  #4  
Old   
Jéjé
 
Posts: n/a

Default Re: programming an AggregationDesign with AMO? - 11-14-2006 , 06:43 PM



to verify which aggregation is used:
go to a partition, open its property page under management studio

and the first value in the property list is the aggregation design ID
this is the current aggregationdesign associated to the partition.

to see the list of the possible aggregation designs, generate the XML/A
script for the measure group and you'll found all the aggregation design
available for this measure group. or use the sample application AMOBrowser
which can display this information too.


"Acius" <acius (AT) nospam (DOT) nospam> wrote

Quote:
I'm confused.
If I do something like
myPartition.Annotations.Add("AggregationPercent", "42")
It shows up as Molap 42% and has a size of 173 KB (obviously nothing under
rows).
It looks like it's worked .. how do you tell if there are really
aggregations present?

Thanks

"Jéjé" wrote:

This code create an empty aggregationdesign without any aggregation
stored
in.
changing the estimatedperformancegain value don't create 42% of
aggregations.

take a look at this sample:
http://msdn2.microsoft.com/en-US/library/ms345091.aspx
(the latest sample code design the aggregations)


vagle (AT) hsr (DOT) no> wrote in message
news:1163504292.215161.199280 (AT) m73g2000cwd (DOT) googlegroups.com...
have anyone done this before? appreciate some tips. My AMO code does
create some aggegation elements in cube partition but I'm not sure it's
enough.

Is this code enough if I only want to set the percentage?

ag = new AggregationDesign("ad");
ag.EstimatedPerformanceGain = 42;
myMeasureGroup.AggregationDesigns.Add(ag);
myPartition.Annotations.Add("AggregationPercent",
"42");
myPartition.AggregationDesignID = "ad";

It does create cube with XML showing <AggregationDesign> with ID of
"ad" and from <Partition> a link to this with
AggregationDesignID>ad</AggregationDesignID>.
What is different from the XMLA created by my AMO code and the XMLA
made from me manually create aggregationdesign is that these things are
missing in XMLA made by AMO code:
the <EstimatedCount>2</EstimatedCount> in dimensions and
EstimatedRows>2385</EstimatedRows> in <partition>.

IS IT STILL OK?

Partitions
Partition
ID>...</ID
Name>...</Name
Annotations
Annotation
Name>AggregationPercent</Name
Value>42</Value
/Annotation
/Annotations
Source xsi:type="DsvTableBinding"

DataSourceViewID>...</DataSourceViewID
TableID>...</TableID
/Source
StorageMode>Molap</StorageMode
ProcessingMode>Regular</ProcessingMode
ProactiveCaching

SilenceInterval>-PT1S</SilenceInterval
Latency>-PT1S</Latency

SilenceOverrideInterval>-PT1S</SilenceOverrideInterval

ForceRebuildInterval>-PT1S</ForceRebuildInterval
Source
xsi:type="ProactiveCachingInheritedBinding" /
/ProactiveCaching

AggregationDesignID>ad</AggregationDesignID
/Partition
/Partitions
AggregationDesigns
AggregationDesign
ID>ad</ID
Name>ad</Name
Dimensions
Dimension

CubeDimensionID>currency</CubeDimensionID
Attributes
Attribute

AttributeID>currency-KEY</AttributeID
/Attribute
Attribute

AttributeID>Currency</AttributeID
/Attribute
/Attributes
/Dimension


(yes I have posted this to two news groups :-)



Reply With Quote
  #5  
Old   
Jesse O.
 
Posts: n/a

Default Re: programming an AggregationDesign with AMO? - 11-15-2006 , 03:19 PM



I'm actually working on a post about this. If you can hold off to Friday
I'll have it done.

<vagle (AT) hsr (DOT) no> wrote

Quote:
have anyone done this before? appreciate some tips. My AMO code does
create some aggegation elements in cube partition but I'm not sure it's
enough.

Is this code enough if I only want to set the percentage?

ag = new AggregationDesign("ad");
ag.EstimatedPerformanceGain = 42;
myMeasureGroup.AggregationDesigns.Add(ag);
myPartition.Annotations.Add("AggregationPercent",
"42");
myPartition.AggregationDesignID = "ad";

It does create cube with XML showing <AggregationDesign> with ID of
"ad" and from <Partition> a link to this with
AggregationDesignID>ad</AggregationDesignID>.
What is different from the XMLA created by my AMO code and the XMLA
made from me manually create aggregationdesign is that these things are
missing in XMLA made by AMO code:
the <EstimatedCount>2</EstimatedCount> in dimensions and
EstimatedRows>2385</EstimatedRows> in <partition>.

IS IT STILL OK?

Partitions
Partition
ID>...</ID
Name>...</Name
Annotations
Annotation
Name>AggregationPercent</Name
Value>42</Value
/Annotation
/Annotations
Source xsi:type="DsvTableBinding"

DataSourceViewID>...</DataSourceViewID
TableID>...</TableID
/Source
StorageMode>Molap</StorageMode
ProcessingMode>Regular</ProcessingMode
ProactiveCaching

SilenceInterval>-PT1S</SilenceInterval
Latency>-PT1S</Latency

SilenceOverrideInterval>-PT1S</SilenceOverrideInterval

ForceRebuildInterval>-PT1S</ForceRebuildInterval
Source
xsi:type="ProactiveCachingInheritedBinding" /
/ProactiveCaching

AggregationDesignID>ad</AggregationDesignID
/Partition
/Partitions
AggregationDesigns
AggregationDesign
ID>ad</ID
Name>ad</Name
Dimensions
Dimension

CubeDimensionID>currency</CubeDimensionID
Attributes
Attribute

AttributeID>currency-KEY</AttributeID
/Attribute
Attribute

AttributeID>Currency</AttributeID
/Attribute
/Attributes
/Dimension


(yes I have posted this to two news groups :-)




Reply With Quote
  #6  
Old   
vagle@hsr.no
 
Posts: n/a

Default Re: programming an AggregationDesign with AMO? - 11-16-2006 , 07:40 AM



sounds very good! I'll wait .....

Jesse O. wrote:
Quote:
I'm actually working on a post about this. If you can hold off to Friday
I'll have it done.



Reply With Quote
  #7  
Old   
vagle@hsr.no
 
Posts: n/a

Default Re: programming an AggregationDesign with AMO? - 11-16-2006 , 10:37 AM



do I have to process the cube first when calling code like:

while ((!finished) && (optimization < optimizationWanted) && (storage
< maxStorageBytes))
{
ad.DesignAggregations(out optimization, out storage,
out aggCount, out finished);
}


I get this error:
The CurrencyKEY attribute of the Currency dimension has zero values.
The server cannot design aggregations for this attribute




Jesse O. wrote:
Quote:
I'm actually working on a post about this. If you can hold off to Friday
I'll have it done.



Reply With Quote
  #8  
Old   
Jesse O.
 
Posts: n/a

Default Re: programming an AggregationDesign with AMO? - 11-21-2006 , 06:58 PM



see the post here:

http://jesseorosz.spaces.live.com/



"Jesse O." <jesperzz (AT) hotmail (DOT) com> wrote

Quote:
I'm actually working on a post about this. If you can hold off to Friday
I'll have it done.

vagle (AT) hsr (DOT) no> wrote in message
news:1163504292.215161.199280 (AT) m73g2000cwd (DOT) googlegroups.com...
have anyone done this before? appreciate some tips. My AMO code does
create some aggegation elements in cube partition but I'm not sure it's
enough.

Is this code enough if I only want to set the percentage?

ag = new AggregationDesign("ad");
ag.EstimatedPerformanceGain = 42;
myMeasureGroup.AggregationDesigns.Add(ag);
myPartition.Annotations.Add("AggregationPercent",
"42");
myPartition.AggregationDesignID = "ad";

It does create cube with XML showing <AggregationDesign> with ID of
"ad" and from <Partition> a link to this with
AggregationDesignID>ad</AggregationDesignID>.
What is different from the XMLA created by my AMO code and the XMLA
made from me manually create aggregationdesign is that these things are
missing in XMLA made by AMO code:
the <EstimatedCount>2</EstimatedCount> in dimensions and
EstimatedRows>2385</EstimatedRows> in <partition>.

IS IT STILL OK?

Partitions
Partition
ID>...</ID
Name>...</Name
Annotations
Annotation
Name>AggregationPercent</Name
Value>42</Value
/Annotation
/Annotations
Source xsi:type="DsvTableBinding"

DataSourceViewID>...</DataSourceViewID
TableID>...</TableID
/Source
StorageMode>Molap</StorageMode
ProcessingMode>Regular</ProcessingMode
ProactiveCaching

SilenceInterval>-PT1S</SilenceInterval
Latency>-PT1S</Latency

SilenceOverrideInterval>-PT1S</SilenceOverrideInterval

ForceRebuildInterval>-PT1S</ForceRebuildInterval
Source
xsi:type="ProactiveCachingInheritedBinding" /
/ProactiveCaching

AggregationDesignID>ad</AggregationDesignID
/Partition
/Partitions
AggregationDesigns
AggregationDesign
ID>ad</ID
Name>ad</Name
Dimensions
Dimension

CubeDimensionID>currency</CubeDimensionID
Attributes
Attribute

AttributeID>currency-KEY</AttributeID
/Attribute
Attribute

AttributeID>Currency</AttributeID
/Attribute
/Attributes
/Dimension


(yes I have posted this to two news groups :-)






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.