Author Topic: HOWTO: Change schema / database reference in Data Modules for Cognos Analytics  (Read 1792 times)

Offline rteruyas

  • Senior Member
  • ****
  • Join Date: Dec 2016
  • Posts: 56
  • Forum Citizenship: +3/-0
Good day guys,

[Introduction]
I was asked a couple of days ago to deploy some reports and data modules from dev to prod. The data module was using DEV.table1,  DEV.table2, DEV.table3 etc and we wanted change it to PRD.table1, PRD.table2, PRD.table3 once the reports were in production. As you may know, current release (R6) of Cognos Analytics doesn't allow you to edit the source for the tables you use, so I bumped into a challenge there.

[Workaround]
I know from v10 that Cognos allows you to do some extra things, but none of them are listed by default.
I needed to get the datamodule definition, but I didn't know what folder to get under installation server. So I thought, well, what's the other place that might contain module definition?
...
BINGO!  Export zip files!
So I created a New Export, put my datamodule there and then opened the zip file (analytics/deployment folder)
There are 3 files there
1. content.xml
2. exportRecord.xml
3. package1.xml

package1.xml is the one to use in this case. Look for
Code: [Select]
<item xsi:type="cm:dataSourceSchema">
You can modify all the connection values
Code: [Select]
<value xsi:type="xsd:string" xml:space="preserve">CAMID(&quot;:&quot;)/dataSource[@name=&apos;DSNAME&apos;]/dataSourceConnection[@name=&apos;DSCONN&apos;]/dataSourceSchema[@name=&apos;DSSCHM&apos;]</value>
Zip the file again with the same name and import it to your server
I know it's a manual process, but it's much better than having to redo the datamodule from scratch.

Hope this helps if you face the same issue in the future
Is there is a better way to do this, please let me know
Have a great weekend and happy reporting!
Happy Reporting!
[Ray]

 



       
Twittear