COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: pooja on 18 Aug 2010 09:30:50 AM

Title: Adding new column on existing FM model..?????
Post by: pooja on 18 Aug 2010 09:30:50 AM
we are trying to add one more column on existing FM model and
trying to find a way.please share how to do it.

thank you so much in advance
Title: Re: Adding new column on existing FM model..?????
Post by: tupac_rd on 18 Aug 2010 09:33:37 AM
if I understand it correctly, you are trying to add a column to an existing table in the FM model. Are you trying to add a calculation or a new column which was added to the database......
Title: Re: Adding new column on existing FM model..?????
Post by: pooja on 18 Aug 2010 09:55:41 AM
not the calculation.
we are trying to pull new column form DB..??? ???

thank you again
Title: Re: Adding new column on existing FM model..?????
Post by: Lynn on 18 Aug 2010 10:18:32 AM
double click on the data source query subject; click the test tab; click the link to Test Sample; Click OK.

Assuming the SQL for the data source query subject is "select * from ...." then this will re-execute it and bring back the new field.
Title: Re: Adding new column on existing FM model..?????
Post by: Sreeni P on 18 Aug 2010 10:19:30 AM
Quote from: pooja on 18 Aug 2010 09:55:41 AM
not the calculation.
we are trying to pull new column form DB..??? ???

thank you again

Hi pooja,

If you want to pull a new column to report from a DB , then take a help of SQL from insertable objects in Querry explorer tab .

drag that SQL and point it is point  new querry (you can Join this SQL queery to your old query which is source for ur report).select the required datasource(DB) from Properties.and query the column which is required for your report..that column will be now present in the SQL Query....hope it will fixes ur requirement
Title: Re: Adding new column on existing FM model..?????
Post by: pooja on 18 Aug 2010 10:36:58 AM
@ LYNN--

we are not getting what you trying to explain.please explain agian plaese.

@ srinivas_p

we are trying got add a new column in FM not in report studio.

please share some help

thank you again
Title: Re: Adding new column on existing FM model..?????
Post by: Lynn on 18 Aug 2010 10:54:55 AM
In the project viewer of Framework Manager you should see all the query subjects for the tables you previously imported. Double-click on the one you need to update (or right-click and select "Edit Definition").

In the dialog that opens you will see a tab called "Test". Click on it.
At the bottom of that tab just above the OK button there is a link that says "Test Sample". Click on it.
Then click OK to close the dialog.
Title: Re: Adding new column on existing FM model..?????
Post by: Sreeni P on 19 Aug 2010 07:58:11 AM
Quote from: Lynn on 18 Aug 2010 10:54:55 AM
In the project viewer of Framework Manager you should see all the query subjects for the tables you previously imported. Double-click on the one you need to update (or right-click and select "Edit Definition").

In the dialog that opens you will see a tab called "Test". Click on it.
At the bottom of that tab just above the OK button there is a link that says "Test Sample". Click on it.
Then click OK to close the dialog.


Hi Lynn

what are you trying to say here, she want to add a new column in existing model in FM.it is quite easy in FM ...

Pooja: I think You are posted in wrong Section, try to put all FM questions in FM section. any ways for your problem , You can add a new column using 'qurry calculation'  on desired Query Subject. it wil add one new column in that query subject,

In query calculation you have to describe your Column using SQL
Title: Re: Adding new column on existing FM model..?????
Post by: Arsenal on 19 Aug 2010 10:13:32 AM
srinivas, Pooja is clearly saying that she wants to add a column which RESIDES on the database. She's NOT trying to create a calculated query item.

Lynn is right. On the DB layer of your FM (or whatever you call your data source query subjects layer), right click the concerned query subject, click edit definition, click the test tab and then click test sample at the bottom of the screen. If everything is fine and results come back including your new column from the DB, click ok.
Then go to your model query subject layer, right click the concerned query subject, click edit definition and then drag in the newly added query item from the model query subject. Change the name if needed. Do the whole test thing as above and click ok if everything looks good.
Title: Re: Adding new column on existing FM model..?????
Post by: blom0344 on 19 Aug 2010 02:09:51 PM
Moderator's note:

Topic moved to the appropriate FM section

Cheers
Title: Re: Adding new column on existing FM model..?????
Post by: bloggerman on 19 Aug 2010 03:35:38 PM

I believe there is another way to it..The one mentioned above should work as well....Click on the Query Subject....Under Tools tab click the "Update Object" option and that should update the Query Subject with latest metadata information from the database. Try it out and let me know if it works.
Title: Re: Adding new column on existing FM model..?????
Post by: cognostechie on 19 Aug 2010 03:41:33 PM
Yes, Tools/Update Object is the right way to do it. However, keep in mind that by doing this, if any column has been deleted from the Table, it will also be deleted from the Query Subject
Title: Re: Adding new column on existing FM model..?????
Post by: MFGF on 26 Aug 2010 05:35:55 AM
Also bear in mind that this will work only for data source query subjects which have a default SQL query (ie select * from <table>).  If a specific query has been hard-coded in the query subject, this will need to be edited to include the new column.

Regards,

MF.