1
Vote

Error retrieving Meta data - invocation.Object reference not set to an instance of an object

description

I was trying to get some Meta data information like SQL Column, DisplayFolder, and Translations of attributes and getting an error. Looks like for some places where we did not set DisplayFolder / Translation value for that getting errors. Is there a work around for this?
 
Statement:
call
assp.discoverxmlmetadata("Database\Dimensions\Dimension\Attributes\Attribute|Name,AttributeHierarchyDisplayFolder,Translations,EstimatedCount\NameColumn\Source")
 
Error:
Execution of the managed stored procedure discoverxmlmetadata failed with the following error: Exception has been thrown by the target of an invocation.Object reference not set to an instance of an object..
Internal error: An unexpected exception occurred.
 
Thanks,
Palash

comments

dgosbell wrote Mar 16, 2012 at 3:55 AM

Hi Palash, sorry for the delay. I did start looking at this, but a number of other priorities have take precedence so I thought I should give you a quick update.

There are 2 issues here 1 is that Translations is not a single attribute. There is a whole hierarchy of elements under Translations and changing the code to accommodate flattening out intermediate structures like this would be quite difficult. The only work around I can think of at the moment would be to look at 2 queries, maybe via a linked server to get the name column source and translation information separately and then join them in your reporting layer.

The other information is the AttributeHiearchyDisplayFolder - this is an optional property and the current code builds the structure of the resultset based on the first object it finds, so if an optional property does not have a value in the first object it never generates a column for this. I will need to look at the code to see if I can fix this.

palashaich wrote Mar 19, 2012 at 10:34 AM

Thank You Dgosbell! I was looking for the DimensionName in cube and the SQL table behind the dimensions. Attribute name and the SQL column behind it, Display folder, visibility, translations and the same for all measures / measure groups. Please let me know once you fix this or if you come across a work around to get all of these in a single query.
My email id is palashaich@gmail.com

Regards,
Palash