Connecting Watson Studio notebooks to Cognos Analytics

If you are running Cognos Analytics on Cloud or Cognos Analytics on IBM Software Hub, you can configure Watson Studio notebooks to connect to Cognos Analytics.

Once it is configured, your Watson Studio notebook can

  • read data assets from Cognos Analytics
  • write data to Cognos Analytics

If you are using Cognos Analytics on Cloud

To connect your notebook to Cognos Analytics, add these two lines to the notebook:

from ca_data_connector import CADataConnector
CADataConnector.connect({'url':'CA_on_Cloud_URL'});

where CA_on_Cloud_URL is the URL that you use to connect to Cognos Analytics on Cloud.

If you are using Cognos Analytics on Cloud Pak for Data

To connect your notebook to Cognos Analytics, add this line to the notebook:

CADataConnector.connect({'url':'CA_URL_in_IBM_Software_Hub'});

where CA_URL_in_IBM_Software_Hub is the URL that you use to connect to your Cognos Analytics instance on IBM Software Hub.

Note: You don't need to include your credentials in the line above. IBM Software Hub will use the credentials from your current Notebook session.