dbTalk Databases Forums  

The attribute key cannot be found (a new twist in the story)

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


Discuss The attribute key cannot be found (a new twist in the story) in the microsoft.public.sqlserver.olap forum.



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

Default The attribute key cannot be found (a new twist in the story) - 10-24-2006 , 04:31 PM






I have searched everywhere for an answer to this particular problem. As many
others have found, the message "The attribute key cannot be found" occurs
when (typically) a key attribute in a fact table cannot be matched in a
dimension table. I have implemented the appropriate steps in the "Custom"
option of "Error Configuration" in properties to handle such problems. I
have, however, found a situation in a cube where, despite appropriate keys
existing in the dimension table/s for transactions in the fact table, some of
the records are being treated as "Unknown". Not only do the keys exist in
both the dimension and the fact tables but the data types for the matching
columns are the same.

The only unusual point that I can think of is that the relational staging
database has been created in SQL Server 2000 while the cube has been created
in SQL Server 2005.

Is there anything I have missed that could solve this problem?


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

Default Re: The attribute key cannot be found (a new twist in the story) - 10-24-2006 , 04:58 PM






My first suggestion would be: make sure the dimension is processed before
the partition.

As a first step, I'd run a trace (if you're using SQL Server RDBMS) to
capture the SQL being sent in by AS. Run that and see if anything is off.

Are the datatypes set the same in AS?



"NeilW" <NeilW (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have searched everywhere for an answer to this particular problem. As
many
others have found, the message "The attribute key cannot be found" occurs
when (typically) a key attribute in a fact table cannot be matched in a
dimension table. I have implemented the appropriate steps in the "Custom"
option of "Error Configuration" in properties to handle such problems. I
have, however, found a situation in a cube where, despite appropriate keys
existing in the dimension table/s for transactions in the fact table, some
of
the records are being treated as "Unknown". Not only do the keys exist in
both the dimension and the fact tables but the data types for the matching
columns are the same.

The only unusual point that I can think of is that the relational staging
database has been created in SQL Server 2000 while the cube has been
created
in SQL Server 2005.

Is there anything I have missed that could solve this problem?




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

Default Re: The attribute key cannot be found (a new twist in the story) - 10-25-2006 , 03:30 AM



Thanks for the response. My Integration Services package does process the
dimensions before the cubes but I will certainly run a trace.

I should have mentioned that 95% of the records in the dimension and fact
tables have actually been matched. It is just 5% of the records that do not
match, even though all the key attributes that I have investigated appear to
match. However, the fact table consists of 32 million records so there is
still an enormous 1.7m records where the key attribute "cannot be found".

"Jesse O." wrote:

Quote:
My first suggestion would be: make sure the dimension is processed before
the partition.

As a first step, I'd run a trace (if you're using SQL Server RDBMS) to
capture the SQL being sent in by AS. Run that and see if anything is off.

Are the datatypes set the same in AS?



"NeilW" <NeilW (AT) discussions (DOT) microsoft.com> wrote in message
news:06D53631-A40F-451B-B48C-C4A747828436 (AT) microsoft (DOT) com...
I have searched everywhere for an answer to this particular problem. As
many
others have found, the message "The attribute key cannot be found" occurs
when (typically) a key attribute in a fact table cannot be matched in a
dimension table. I have implemented the appropriate steps in the "Custom"
option of "Error Configuration" in properties to handle such problems. I
have, however, found a situation in a cube where, despite appropriate keys
existing in the dimension table/s for transactions in the fact table, some
of
the records are being treated as "Unknown". Not only do the keys exist in
both the dimension and the fact tables but the data types for the matching
columns are the same.

The only unusual point that I can think of is that the relational staging
database has been created in SQL Server 2000 while the cube has been
created
in SQL Server 2005.

Is there anything I have missed that could solve this problem?





Reply With Quote
  #4  
Old   
Ohjoo Kwon
 
Posts: n/a

Default Re: The attribute key cannot be found (a new twist in the story) - 10-25-2006 , 04:21 AM



If the dimension processing is done first, I usually like to run next kind
of query for simple verification.

SELECT Top 10 A.DimId, ...
FROM FactTable A LEFT OUTER JOIN DimTable B
ON A.DimId = B.DimId
WHERE B.DimID IS NULL

If some records are returned, it will cause key errors during cube
processing in AS 2005.

But it does not cause key errors in AS 2000 until schema optimization,
because the joins between dimension and fact tables are alive during cube
processing.

Ohjoo


"NeilW" <NeilW (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks for the response. My Integration Services package does process the
dimensions before the cubes but I will certainly run a trace.

I should have mentioned that 95% of the records in the dimension and fact
tables have actually been matched. It is just 5% of the records that do
not
match, even though all the key attributes that I have investigated appear
to
match. However, the fact table consists of 32 million records so there is
still an enormous 1.7m records where the key attribute "cannot be found".

"Jesse O." wrote:

My first suggestion would be: make sure the dimension is processed before
the partition.

As a first step, I'd run a trace (if you're using SQL Server RDBMS) to
capture the SQL being sent in by AS. Run that and see if anything is off.

Are the datatypes set the same in AS?



"NeilW" <NeilW (AT) discussions (DOT) microsoft.com> wrote in message
news:06D53631-A40F-451B-B48C-C4A747828436 (AT) microsoft (DOT) com...
I have searched everywhere for an answer to this particular problem. As
many
others have found, the message "The attribute key cannot be found"
occurs
when (typically) a key attribute in a fact table cannot be matched in a
dimension table. I have implemented the appropriate steps in the
"Custom"
option of "Error Configuration" in properties to handle such problems.
I
have, however, found a situation in a cube where, despite appropriate
keys
existing in the dimension table/s for transactions in the fact table,
some
of
the records are being treated as "Unknown". Not only do the keys exist
in
both the dimension and the fact tables but the data types for the
matching
columns are the same.

The only unusual point that I can think of is that the relational
staging
database has been created in SQL Server 2000 while the cube has been
created
in SQL Server 2005.

Is there anything I have missed that could solve this problem?







Reply With Quote
  #5  
Old   
NeilW
 
Posts: n/a

Default Re: The attribute key cannot be found (a new twist in the story) - 10-27-2006 , 03:41 AM



Thanks for your response. I will certainly use your practice in future
implementations.

I have actually solved my problem by deleting the dimension and creating it
again. Like magic, the attribute keys were suddenly found. I have noticed
this problem before on a couple of third party training courses. Dare I call
this a BUG?!?!

"Ohjoo Kwon" wrote:

Quote:
If the dimension processing is done first, I usually like to run next kind
of query for simple verification.

SELECT Top 10 A.DimId, ...
FROM FactTable A LEFT OUTER JOIN DimTable B
ON A.DimId = B.DimId
WHERE B.DimID IS NULL

If some records are returned, it will cause key errors during cube
processing in AS 2005.

But it does not cause key errors in AS 2000 until schema optimization,
because the joins between dimension and fact tables are alive during cube
processing.

Ohjoo


"NeilW" <NeilW (AT) discussions (DOT) microsoft.com> wrote in message
news:CA306376-C7B7-4704-8C1B-449C3FE8ABAA (AT) microsoft (DOT) com...
Thanks for the response. My Integration Services package does process the
dimensions before the cubes but I will certainly run a trace.

I should have mentioned that 95% of the records in the dimension and fact
tables have actually been matched. It is just 5% of the records that do
not
match, even though all the key attributes that I have investigated appear
to
match. However, the fact table consists of 32 million records so there is
still an enormous 1.7m records where the key attribute "cannot be found".

"Jesse O." wrote:

My first suggestion would be: make sure the dimension is processed before
the partition.

As a first step, I'd run a trace (if you're using SQL Server RDBMS) to
capture the SQL being sent in by AS. Run that and see if anything is off.

Are the datatypes set the same in AS?



"NeilW" <NeilW (AT) discussions (DOT) microsoft.com> wrote in message
news:06D53631-A40F-451B-B48C-C4A747828436 (AT) microsoft (DOT) com...
I have searched everywhere for an answer to this particular problem. As
many
others have found, the message "The attribute key cannot be found"
occurs
when (typically) a key attribute in a fact table cannot be matched in a
dimension table. I have implemented the appropriate steps in the
"Custom"
option of "Error Configuration" in properties to handle such problems.
I
have, however, found a situation in a cube where, despite appropriate
keys
existing in the dimension table/s for transactions in the fact table,
some
of
the records are being treated as "Unknown". Not only do the keys exist
in
both the dimension and the fact tables but the data types for the
matching
columns are the same.

The only unusual point that I can think of is that the relational
staging
database has been created in SQL Server 2000 while the cube has been
created
in SQL Server 2005.

Is there anything I have missed that could solve this problem?








Reply With Quote
  #6  
Old   
Chris Webb
 
Posts: n/a

Default Re: The attribute key cannot be found (a new twist in the story) - 10-30-2006 , 09:08 AM



Not sure whether this fits your scenario, but I've seen this error message on
case sensitive installations. If I remember correctly, it was happening when
I was using a char or varchar column as the key of an attribute and there
were rows where the values were the same but the case was different, eg in
the City column there might be values like 'LONDON' and 'London'. Forcing
everything to the same case cured the problem.

Chris
--
Chris Webb, MVP
Analysis Services and MDX Consultancy: http://www.crossjoin.co.uk
Blog: http://cwebbbi.spaces.live.com/


"NeilW" wrote:

Quote:
Thanks for your response. I will certainly use your practice in future
implementations.

I have actually solved my problem by deleting the dimension and creating it
again. Like magic, the attribute keys were suddenly found. I have noticed
this problem before on a couple of third party training courses. Dare I call
this a BUG?!?!

"Ohjoo Kwon" wrote:

If the dimension processing is done first, I usually like to run next kind
of query for simple verification.

SELECT Top 10 A.DimId, ...
FROM FactTable A LEFT OUTER JOIN DimTable B
ON A.DimId = B.DimId
WHERE B.DimID IS NULL

If some records are returned, it will cause key errors during cube
processing in AS 2005.

But it does not cause key errors in AS 2000 until schema optimization,
because the joins between dimension and fact tables are alive during cube
processing.

Ohjoo


"NeilW" <NeilW (AT) discussions (DOT) microsoft.com> wrote in message
news:CA306376-C7B7-4704-8C1B-449C3FE8ABAA (AT) microsoft (DOT) com...
Thanks for the response. My Integration Services package does process the
dimensions before the cubes but I will certainly run a trace.

I should have mentioned that 95% of the records in the dimension and fact
tables have actually been matched. It is just 5% of the records that do
not
match, even though all the key attributes that I have investigated appear
to
match. However, the fact table consists of 32 million records so there is
still an enormous 1.7m records where the key attribute "cannot be found".

"Jesse O." wrote:

My first suggestion would be: make sure the dimension is processed before
the partition.

As a first step, I'd run a trace (if you're using SQL Server RDBMS) to
capture the SQL being sent in by AS. Run that and see if anything is off.

Are the datatypes set the same in AS?



"NeilW" <NeilW (AT) discussions (DOT) microsoft.com> wrote in message
news:06D53631-A40F-451B-B48C-C4A747828436 (AT) microsoft (DOT) com...
I have searched everywhere for an answer to this particular problem. As
many
others have found, the message "The attribute key cannot be found"
occurs
when (typically) a key attribute in a fact table cannot be matched in a
dimension table. I have implemented the appropriate steps in the
"Custom"
option of "Error Configuration" in properties to handle such problems.
I
have, however, found a situation in a cube where, despite appropriate
keys
existing in the dimension table/s for transactions in the fact table,
some
of
the records are being treated as "Unknown". Not only do the keys exist
in
both the dimension and the fact tables but the data types for the
matching
columns are the same.

The only unusual point that I can think of is that the relational
staging
database has been created in SQL Server 2000 while the cube has been
created
in SQL Server 2005.

Is there anything I have missed that could solve this problem?








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.