Friday, February 24, 2012

attribute key was not found error

everytime i try to process my cube i get this error:

Errors in the OLAP storage engine: The attribute key cannot be found:

Table: dbo_MCSFinFactData, Column: InvoiceDateDimensionID, Value: 15.

Errors in the OLAP storage engine: The record was skipped because the attribute key was not found.

Attribute: InvoiceDateDimensionID 8 of Dimension: InvoiceDate Fiscal Year 2 from Database:

SRDBAnalysis, Cube: MCSFinancial, Measure Group: MCSFinancial, Partition: MCSFinancial, Record: 10.

I have checked the dimension table and the record with an invoicedatedimensionid value of 15 exists. there are also many records in the fact table that use an invoicedatedimensionid of 15. if the record exists in both tables, why does it say the attribute key was not found?

i have resolved this, only i dont understand why my actions resolved the issue and was hoping someone could explain.

in the error( in the above post) you see the attribute was "invoiceDate fiscal year 2". i just processed the attribute manually, and had to do the same with a handfull of other attributes, and now the cube works. why is this? also , is there a quicker way, as id rather not have to process 20 - 30 attributes manually each time there is a problem!

|||

Here is another thread on the same matter

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1198671&SiteID=1

The ultimate resolution should be fixing referential integrity problems in relational database and not processing dimensions in different order.

BTW, you cannot process a single attribute by itself

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||there are no referential integrity issues within my database. i have made 100% sure of this. this database has been in use for 6 years with analysis services 2000, and there were never processing errors, and the processing was set to tolerate no errors. so it cannot be a database issue. im wondering if i just have to recreate the cubes completely in analysis server 2005? this isnt upgrade any more, its just redevelopment of old projects.|||

Analysis Services 2005 is little bit more strict when comapred to AS2000 in the way it is detecting inconsistencies in relational database. If you run SQL Profiler you'd mention that it is also uses different strategy when querying relational database during processing.

Every attribute is processed separately and in case of AS2000 you'd see a one query per dimension, in AS2005 you see multiple SQL queries sent- one per dimension attribute.

See this paper describing new processing architechture: http://msdn2.microsoft.com/en-us/library/ms345142.aspx

As for detecting inconsistensies in relational database, it could be tricky. For instance, the reason Analysis Server wouldnt find a key for attribute member is; you allowed for processing ignore records with repeated key. Set KeyDuplicate to ReportAndStop. In fact set ReportAndStop for every setting in ErrorConfiguration for your processing command.

Here is whitepaper talks about setting error configuration http://msdn2.microsoft.com/en-us/library/ms345138.aspx

And it is also important to review new dimension stucture and see what becomes a source for attribute key column/s and what it is name.

Migration process might have some quirks in some complex cases mapping AS2000 database to AS2005. As for Analysis Server detecting missing keys - every time I run into missing key case it is always comes down to some modeling or data issues.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment