Showing posts with label adding. Show all posts
Showing posts with label adding. Show all posts

Friday, February 17, 2012

Custom Assembly generates error in Aggregation Wizard

I have a fairly simple custom assembly for adding some functions to a cube. Having a reference to the assembly in the cube project causes the following error when I try and run the aggregation wizard for the cube:

Message: Errors in the metadata manager. The system assembly cannot be modified by a user request. To restart the process, resolve the problem and then click start.

I get the message after the "Specify Object Counts" step, when it starts the process of determining the aggregations.

Is this a bug or is there something I need to do in the custom assembly differently? I started with the code framework from the AdventureWorksAMO sample project, and added/removed functions.

After applying SP1, I now get the following error when running the aggregation wizard:

"clr assembly must have main file specified"

The workaround is to remove the assembly reference and then run the aggregation wizard, and then re-add the assembly reference.

Although this works, it bring into question why the error in the first place? Any CLR assembly I've tested causes the same problem.

|||

This error will be fixed in the next SP, meanwhile the work-around is indeed to remove the assemblies and add them back after designing aggregations.

About why the error happens in the first place:

- when ran from BI development studio, the aggregation design wizard can have unsaved changes in the background (in the cube and/or dimension editors). or the entire BI project database might not have been deployed

- the wizard requires the database to be saved to the server in order to use the aggregations designing algorithm, so it does temporarily deploy the database (in a transaction that is being rolled back at the end); this is where the error about the assemblies happens

Adrian Dumitrascu

Custom Assembly generates error in Aggregation Wizard

I have a fairly simple custom assembly for adding some functions to a cube. Having a reference to the assembly in the cube project causes the following error when I try and run the aggregation wizard for the cube:

Message: Errors in the metadata manager. The system assembly cannot be modified by a user request. To restart the process, resolve the problem and then click start.

I get the message after the "Specify Object Counts" step, when it starts the process of determining the aggregations.

Is this a bug or is there something I need to do in the custom assembly differently? I started with the code framework from the AdventureWorksAMO sample project, and added/removed functions.

After applying SP1, I now get the following error when running the aggregation wizard:

"clr assembly must have main file specified"

The workaround is to remove the assembly reference and then run the aggregation wizard, and then re-add the assembly reference.

Although this works, it bring into question why the error in the first place? Any CLR assembly I've tested causes the same problem.

|||

This error will be fixed in the next SP, meanwhile the work-around is indeed to remove the assemblies and add them back after designing aggregations.

About why the error happens in the first place:

- when ran from BI development studio, the aggregation design wizard can have unsaved changes in the background (in the cube and/or dimension editors). or the entire BI project database might not have been deployed

- the wizard requires the database to be saved to the server in order to use the aggregations designing algorithm, so it does temporarily deploy the database (in a transaction that is being rolled back at the end); this is where the error about the assemblies happens

Adrian Dumitrascu

Tuesday, February 14, 2012

Custom aggregation value for all hierarchies'' levels above a specific level name?

I currently have a customer and product dimension. I'm planning on adding in a fact 'customer count', based on whether or not the customer has a specific product, and I'd also be adding a Product Status dimension. I think I'll have the default member of Product Status be 'Active' because generally, people want to see only this type of number.

The behavior that I'd want is:

If Product Status is used with Product.Product.All, then I want a behavior of "check for at least 1 Active product status for the current customer and if it is found, then the customer's status is "Active", otherwise it would be "Inactive". This is similar to what I'd want for different hierarchies in the product dimension.

I have several product hierarchies that and 'Product' is at different levels of the hierarchies. Any level above 'Product' should have a behavior as described above.

Is this definitely possible and does it have minimal impact on query times and performance?

There might be a better design - if so, please comment and set me straight. Thanks!

I did a test and I see now that the default behavior takes care of this for 'active' (anything above product level is only counted once because I'm using a distinct count type measure)

But now what's needed is a custom behavior when inactive is used with a 'customer count' measure. If looking at inactive counts for a Product.Product.All, an item (customer) should only be counted if all of their products are inactive.

How would one go about overriding the cube behavior?

If there are no other ideas, I may have to do a dirty workaround and make another status - 'Entirely Inactive' and it would mean that all products for a customer are inactive, calculated in the dsv table.

|||

Here is my attempt at trying to override the inactive member, but what needs to change for it to work correctly?

I've included syntax of 'currenthierarchy', but i don't know if that's really possible.

SCOPE(Measures.[Customer Count], [Product Status].[Product Status].[Inactive])

this = IIF( IsEmpty(HEAD(EXISTS(DESCENDANTS([Product].CurrentHierarchy.CurrentMember) * [Customer].[Customer].CurrentMember, [Product Status].[Product Status].[Active]))), [Product Status].[Product Status].[Inactive], [Product Status].[Product Status].[Active[)

END SCOPE

Again in English, what I want to do is override the value of [Product Status].[Product Status] to be active if any of the descendants of the current product have an active status. Some attributes of the product dimension can't determine this - ie color, but having several trees, I'm not sure how to get at the hierarchy dynamically. Also, is "this = " correct?

Custom aggregation value for all hierarchies'' levels above a specific level name?

I currently have a customer and product dimension. I'm planning on adding in a fact 'customer count', based on whether or not the customer has a specific product, and I'd also be adding a Product Status dimension. I think I'll have the default member of Product Status be 'Active' because generally, people want to see only this type of number.

The behavior that I'd want is:

If Product Status is used with Product.Product.All, then I want a behavior of "check for at least 1 Active product status for the current customer and if it is found, then the customer's status is "Active", otherwise it would be "Inactive". This is similar to what I'd want for different hierarchies in the product dimension.

I have several product hierarchies that and 'Product' is at different levels of the hierarchies. Any level above 'Product' should have a behavior as described above.

Is this definitely possible and does it have minimal impact on query times and performance?

There might be a better design - if so, please comment and set me straight. Thanks!

I did a test and I see now that the default behavior takes care of this for 'active' (anything above product level is only counted once because I'm using a distinct count type measure)

But now what's needed is a custom behavior when inactive is used with a 'customer count' measure. If looking at inactive counts for a Product.Product.All, an item (customer) should only be counted if all of their products are inactive.

How would one go about overriding the cube behavior?

If there are no other ideas, I may have to do a dirty workaround and make another status - 'Entirely Inactive' and it would mean that all products for a customer are inactive, calculated in the dsv table.

|||

Here is my attempt at trying to override the inactive member, but what needs to change for it to work correctly?

I've included syntax of 'currenthierarchy', but i don't know if that's really possible.

SCOPE(Measures.[Customer Count], [Product Status].[Product Status].[Inactive])

this = IIF( IsEmpty(HEAD(EXISTS(DESCENDANTS([Product].CurrentHierarchy.CurrentMember) * [Customer].[Customer].CurrentMember, [Product Status].[Product Status].[Active]))), [Product Status].[Product Status].[Inactive], [Product Status].[Product Status].[Active[)

END SCOPE

Again in English, what I want to do is override the value of [Product Status].[Product Status] to be active if any of the descendants of the current product have an active status. Some attributes of the product dimension can't determine this - ie color, but having several trees, I'm not sure how to get at the hierarchy dynamically. Also, is "this = " correct?

Custom aggregation value for all hierarchies'' levels above a specific level name?

I currently have a customer and product dimension. I'm planning on adding in a fact 'customer count', based on whether or not the customer has a specific product, and I'd also be adding a Product Status dimension. I think I'll have the default member of Product Status be 'Active' because generally, people want to see only this type of number.

The behavior that I'd want is:

If Product Status is used with Product.Product.All, then I want a behavior of "check for at least 1 Active product status for the current customer and if it is found, then the customer's status is "Active", otherwise it would be "Inactive". This is similar to what I'd want for different hierarchies in the product dimension.

I have several product hierarchies that and 'Product' is at different levels of the hierarchies. Any level above 'Product' should have a behavior as described above.

Is this definitely possible and does it have minimal impact on query times and performance?

There might be a better design - if so, please comment and set me straight. Thanks!

I did a test and I see now that the default behavior takes care of this for 'active' (anything above product level is only counted once because I'm using a distinct count type measure)

But now what's needed is a custom behavior when inactive is used with a 'customer count' measure. If looking at inactive counts for a Product.Product.All, an item (customer) should only be counted if all of their products are inactive.

How would one go about overriding the cube behavior?

If there are no other ideas, I may have to do a dirty workaround and make another status - 'Entirely Inactive' and it would mean that all products for a customer are inactive, calculated in the dsv table.

|||

Here is my attempt at trying to override the inactive member, but what needs to change for it to work correctly?

I've included syntax of 'currenthierarchy', but i don't know if that's really possible.

SCOPE(Measures.[Customer Count], [Product Status].[Product Status].[Inactive])

this = IIF( IsEmpty(HEAD(EXISTS(DESCENDANTS([Product].CurrentHierarchy.CurrentMember) * [Customer].[Customer].CurrentMember, [Product Status].[Product Status].[Active]))), [Product Status].[Product Status].[Inactive], [Product Status].[Product Status].[Active[)

END SCOPE

Again in English, what I want to do is override the value of [Product Status].[Product Status] to be active if any of the descendants of the current product have an active status. Some attributes of the product dimension can't determine this - ie color, but having several trees, I'm not sure how to get at the hierarchy dynamically. Also, is "this = " correct?