Page 1 of 1

Anyone know how to harvest/export Cognos tool tip defs?

Posted: Mon Jul 02, 2012 10:41 am
by deboots
We are getting ready to implement InfoSphere Business Glossary and link it to Cognos. As most of you know, we can easily change the Cognos configuration to use BG as the source for definitions. However, there have been some implementations through the years where developers embedded term definitions within the Cognos packages using tooltips/screentips. It's difficult to assess whether these are being used. I don't want to remove functionality from the business. I'd like to be able to harvest this data in some way. If I could access it easily I could then format it to batch load it into the Business Glossary.

Anyone know how to get this tooltip / screentip data out of Cognos?
Anyone know an easy way to scan and determine where tooltips/screentips exist within Cognos?

Thanks!

Posted: Mon Jul 02, 2012 4:46 pm
by ray.wurlod
After you've imported the Cognos BI report definitions, does perhaps the bi2bg utility pick up terms defined in tooltips?

Posted: Mon Jul 02, 2012 10:57 pm
by vmcburney
This is easier of version 8.7 than earlier versions. First you run the Metadata Asset Manager to import the Cognos metadata from Cognos into the Information Server. The Metadata Asset Manager has a wizard and shows the bridge parameters for your import. You should test it out with one smaller cognos folder or package first to get it working.

Next run the aforementioned bi2bg option for istools on the Information Server. This will convert the Cognos model into a Business Glossary - it should come through with the report headings and the tooltips.
bi2bg Documentation.

Both processes may fail if you try it on an entire Glossary model so I would trial it on a subset first.

Posted: Mon Jul 02, 2012 11:28 pm
by ray.wurlod
Indeed it can fail even on a medium sized Cognos model.

One way we have had to implement is to replace the 32-bit JVM that installs with the product with a 64-bit JVM provided by IBM support. No more java.lang.OutOfMemory errors (thus far)!

Finally just wrote a Python script to parse the Cognos FM

Posted: Mon Jul 30, 2012 2:48 pm
by deboots
Thanks for the documentation link, Vince. However, we still didn't find this to be very easy - even on 8.7. We were able to import the BI model into the repository - though had to guess at what was needed on some of the prompt screens. However, could never get the bi2bg parameters on istools to run.

One of the programmers did however write a python script that pulls the tool tip text into an Excel file along with the context/path. Since I wanted the Stewards to review those prior to load - that gives me what I really need (since I can now reformat that into the .csv import format that BG really wants).

I still want to be able to use the bi2bg process - but at this point may just wait to corner or bribe someone at IOD to walk me through it. :wink:

Posted: Mon Jul 30, 2012 5:19 pm
by ray.wurlod
I'm running bi2bg successfully at my current site (finishing there today) so let's catch up at IOD.

We've scripted it to run out of a third party scheduler, but the script itself is very straightforward. You'll notice we're running on Windows, so it's a BAT file, but there's hardly any logic to it. In UNIX use $? rather than %ERRORLEVEL% and test -f rather than exist and you should be very close.

Code: Select all

@ECHO OFF
REM Identify business terms in previously imported Cognos assets.
REM Authentication information is in local file "E:\Data\Authfile\ServiceBGAdmin.txt" (password is encrypted).
REM Configuration file is "E:\Scripts\Cognos\bi2bgconfig.ini" (supplied by IBM and edited).

:processing
REM Domain name uses DNS entry to mask real server name
set domainName=ATOBusinessGlossary
REM Pathname of istool command
set istoolCmd=E:\IBM\InformationServer\Clients\istools\cli\istool
REM Pathname of authentication file
set authFile="E:\Data\Authfile\ServiceBGAdmin.txt"
REM Pathname of bi2bg configuration file
set configFile="E:\Scripts\Cognos\bi2bg_config.ini"
REM Pathname of log file
set DateTag=%date:~-4,4%%date:~-7,2%%date:~0,2%
set logFile="E:\Scripts\Cognos\logs\bi2bg_%DateTag%.log"

echo.Started %date% %time% 
if exist "E:\Scripts\Cognos\bi2bg_preview.csv" DEL "E:\Scripts\Cognos\bi2bg_preview.csv" && echo."E:\Scripts\Cognos\bi2bg_preview.csv" deleted.
if exist "E:\Scripts\Cognos\bi2bg_duplicate_terms.csv" DEL "E:\Scripts\Cognos\bi2bg_duplicate_terms.csv" && echo."E:\Scripts\Cognos\bi2bg_duplicate_terms.csv" deleted.
echo.
echo.Command being executed:
REM Process business terms in imported Cognos assets.
REM To create a preview file only, use configuration file bi2bg_config_previewonly.ini; to actually populate the metadata
REM repository, use configuration file bi2bgconfig.ini.
echo %istoolCmd% glossary bi2bg -cfg %configFile% -domain %domainName% -authfile %authFile% -verbose -log %logFile%
%istoolCmd% glossary bi2bg -cfg %configFile% -domain %domainName% -authfile %authFile% -verbose -log %logFile% 
set result=%ERRORLEVEL%
echo.Finished %date% %time% - status = %result%

if %result%==0 echo Processing of Cognos terms complete.  Details in "istool_glossary_bi2bg_%DateTag%.out".
if %result%==0 goto finish
echo. Processing of Cognos terms failed. See "istool_glossary_bi2bg_%DateTag%.out" for details.

:finish
The configuration file is not too tricky. Here's the one I put in place. The structure is well documented in the Information Center.

Code: Select all

# Specifies the names of the models to be processed.
ModelsToProcess = *

# String to be displayed in the Example attribute of the term in Business Glossary.
MemberTypeRegular = Dimension
MemberTypeMeasure = Fact

# If TRUE, BI collection members are assigned to the terms that are created from them.
ClassifyMemberTargetSource = TRUE

# List of categories to exclude.
CategoriesToExclude = test

# Specify the merge option to use when the categories and terms are imported.
# MERGE_SOURCE_BIAS merges the asset and overwrites existing attributes that cannot be merged.
# MERGE_TARGET_BIAS merges the asset and ignores imported attributes that cannot be merged.
MergeOption = MERGE_SOURCE_BIAS

# If TRUE, sets the IsModifier attribute of all imported items to "Yes".
IsModifier = FALSE

# Specify the Business Glossary status attribute of all imported terms.
Status = ACCEPTED

# Type specifies the Business Glossary type attribute of all imported terms.
Type = NONE

# Specify whether to create a Business Glossary preview in a CSV file or in the log file.
# If a preview is selected, nothing is written into the Business Glossary itself.
# If a preview is not selected the other three settings in this group are ignored.
CreateBusinessGlossaryPreview = FALSE
BusinessGlossaryPreviewFormat = CSV
BusinessGlossaryPreviewCSVFilePath = E:\\Scripts\\Cognos\\bi2bg_preview.csv
FirstRowColumnNames = TRUE

# Category under which to store terms migrated from Cognos assets by the bi2bg utility.
ImportToTopCategory = TRUE
TopCategoryName = Enterprise Reporting

# Handling of duplicate terms.
CheckForDuplicateTerms = TRUE
DuplicateTermsFileName = E:\\Scripts\\Cognos\\bi2bg_duplicate_terms.csv

Posted: Tue Jul 31, 2012 5:34 am
by eostic
Hi Ray...

Thanks......though I'm not certain that bi2bg picks up all of the possible description properties that may have originated in FrameWorker Manager for a particular Package that you've imported.... can you confirm which of the properties you are successfully getting for each query item? Description? Screen Tip? other?

...I've often been doing other things like exporting the Framework Manager as XML, and then pulling out various bits into a spreadsheet or csv, as deboots suggests.

Thanks.

Ernie

Posted: Tue Jul 31, 2012 5:37 am
by eostic
Hi Ray...

Thanks......though I'm not certain that bi2bg picks up all of the possible description properties that may have originated in FrameWorker Manager for a particular Package that you've imported.... can you confirm which of the properties you are successfully getting for each query item? Description? Screen Tip? other?

...I've often been doing other things like exporting the Framework Manager as XML, and then pulling out various bits into a spreadsheet or csv, as deboots suggests.

Thanks.

Ernie

Posted: Tue Jul 31, 2012 3:41 pm
by ray.wurlod
I have finished at that site, so can not confirm or deny whether all properties are received for each query item - nor even if they use tool tips at all.