Thursday, March 5, 2009

COGNOS – Using a blob column in this query requires that the query subject ….. must have either a key or a unique index


BLOB is basically an abbreviation for Binary Large OBject. It is a collection of binary data in the database.
The snapshot above shows an error because of the BLOB and one of the main reasons for that error could be a particular field in the DB that is a text field. At least in my case, when I first encountered this issue, it was because of ‘text’ field in the db which is not supported by COGNOS. So the solution for this is to change the text field in the DB into a VarChar.
In one of the metadata queries, we again faced this issue even though we had updated the DB long back. This error started coming when we added new data into one metadata query @ the package level. When I tested the query individually at the import layer; it seems to be working but when I am combining couple of these BLOB VarChar from different metadata queries I was facing this issue again. So I named these same objects differently at the import layer level (on different queries) and joined them @ the package level it seemed to be working.
I am sure that this error had nothing to do with the blob issue but it was still throwing the BLOB error. I would say; always name the metadata with different and specific names so that the system does not get confused when we create relationships.

7 comments:

Unknown said...

Sandeep,

I have to create a report where it refers to BLOB (.pdf) column in database. how do I create this report?

Sandeep Pasuparthy said...

Can you give me more details on what kind of report you are trying to build. :)

Sri, please forward me your contact details to make the communication faster.

Willy Billy said...

hi Sandeep, I have a Blob which stores pics. I had defined the MIME type too as JPEG. But nothing working so far..

Dcozens said...

Thanks for this the IBM definition is at https://www-304.ibm.com/support/docview.wss?uid=swg21342987

However your explanation is far more readable

Sandeep Pasuparthy said...

Thank you Dcozens. This positive feedback does give me more inspiration to continue blogging.

Sandeep Pasuparthy said...

Sri & William, I would need more details from guys to help you out. I know my reply is late. :) Hope you guys could solve the issue.

Chen Mosko said...

I love your post! thanks for the explanation !