COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Administration and Security => Topic started by: adam_mc on 18 May 2023 01:40:45 PM

Title: Export all Report XMLs - CA 11.1.7
Post by: adam_mc on 18 May 2023 01:40:45 PM
I am looking to export all our report XML's from the Content Store and store in BitBucket so we can create a new repository of all our reports.

This should enable us to have version control and a standard location for all our developers to pull the latest version of the report.

We have an Oracle Content Store - I have tried creating a SQL against the Content Store, but I am running into problems parsing the CLOB column that the specification is defined. The maximum characters to convert from CLOB to Varchar seems to be around 4000, but the maximum report is 1+ million characters. I could manually create 500+ columns using substring, but then need a way to concatenate those columns together without losing any characters.

If anyone has any better thoughts on how to accomplish this, I would greatly appreciate it.

Thanks in advance,
Adam.

   
Title: Re: Export all Report XMLs - CA 11.1.7
Post by: dougp on 19 May 2023 11:00:32 AM
My stack is a little different from yours:
Cognos Analytics 11.1.7
Windows
IIS
SQL Server
Microsoft DevOps
Git
PowerShell
tidy

I have had exactly what you are asking about running for years, but also getting datasets (XML) and dashboards (JSON).  In SQL Server, the report spec (CMOBJPROPS7.SPEC) is NTEXT.  I don't cast the data type.  PowerShell seems to consume it correctly.  No need to parse it.  Just write it to an XML file and then run that through something like tidy.exe so it's not all on one line.  (If I remember correctly, using PowerShell to create an object based on the XML then writing that back to a string changed it somehow.)  The push to the remote repo.