Connecting Watson Studio notebooks to Cognos Analytics

If you are running Cognos Analytics on Cloud or Cognos Analytics on Cloud Pak for Data, 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_Cloud_Pak_for_Data'});

where CA_URL_in_Cloud_Pak_for_Data is the URL that you use to connect to your Cognos Analytics instance on Cloud Pak for Data.

Note: You don't need to include your credentials in the line above. Cloud Pak for Data will use the credentials from your current Notebook session.