COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: ry1633 on 02 Sep 2015 11:25:10 AM

Title: Identifying Primary Keys in model
Post by: ry1633 on 02 Sep 2015 11:25:10 AM
In FM, is there a way to identify which fields are Primary Keys?  In my model, I'm working with data views not actual tables.  Just didn't know if I could find the PK using Cognos FM or if I'd have to go back into the views themselves (like with Oracle Toad) and look for them that way.
Title: Re: Identifying Primary Keys in model
Post by: bdbits on 02 Sep 2015 11:59:44 AM
I cannot recall with Oracle, but with SQL Server at least views don't have keys.

You can mark columns as identifiers, but I am wondering if there is more to this. Is there a specific problem you are trying to solve?
Title: Re: Identifying Primary Keys in model
Post by: ry1633 on 02 Sep 2015 01:28:43 PM
just wanting to identify PKs in my FM model so I can hide a few of them when I push a package out.  In Framework Manager,  is it the PK that has the different icon than the other query subjects and objects?   see screenshot.
Title: Re: Identifying Primary Keys in model
Post by: bdbits on 02 Sep 2015 03:36:56 PM
That is an identifier, to use FM parlance. Usually that is your primary key(s). But, FM does not always get that right, so I would verify.
Title: Re: Identifying Primary Keys in model
Post by: ry1633 on 02 Sep 2015 04:20:07 PM
great, that's helpful.  I'll have to look at that and check with my dba guys
Title: Re: Identifying Primary Keys in model
Post by: cognostechie on 02 Sep 2015 05:20:44 PM
That icon indicates an identifier which means it could be a PK, any field on which there is an index, any Date field and a few other cases. For hiding the keys, you can check the data. If it is not the IDs or the Codes then you can hide it. Basically, any field which the user would never need to see like any surrogate keys regardless of whether or not they are PKs or FKs.