Adding connections to projects (Watson Studio and Watson Knowledge Catalog)

You need to create a connection asset for a data source in a project before you can load data to or from it. A connection asset contains the information necessary to establish a connection to a data source.

Create connections to multiple types of data sources, including IBM Cloud services, other cloud services, on-prem databases, and more.

You can create a connection asset from a platform-level connection or create a platform-level connection from a connection asset that you create in a project. For information about differences between creating connections at the service level or at the platform level, see Connecting to data sources.

See Supported data sources for the list of data sources.

To create a new connection in a project:

  1. Go to the project page. Click Assets > New asset > Data access tools > Connection.

  2. If you want to use a platform-level connection, click the From platform tab.

  3. Choose a data source.

  4. Enter the connection information that is required for the data source. Typically, you need to provide information like the hostname, port number, username, and password.

  5. If prompted, specify whether you want to use personal or shared credentials. You cannot change this option after you create the connection.

    • Personal: With personal credentials, each user must specify their own credentials to access the connection. Each user's credentials are saved but are not shared with any other users. Use personal credentials instead of shared credentials to protect credentials. For example, when personal credentials are used, the credentials are invalidated to prevent malicious redirection if another user changes connection properties such as the hostname or port number.
    • Shared: With shared credentials, all users access the connection using the same credentials. The default setting is Shared. An administrator can disable shared credentials.
  6. If a vault is set up for the platform and the service support secrets, in the Credentials section you can select to use secrets from a vault. See Using vault secrets in connections for instructions and restrictions.

  7. Set Mask sensitive credentials retrieved through API calls to On if you want to prevent users, including the owner of the connection, from retrieving unmasked sensitive credentials through API calls. Update any notebooks that reference this connection through API calls to use the Flight service. This setting has no effect on the connection form itself. Not all services support this setting. If you enable this setting for an unsupported service, the connection will fail. See Flight service for access to data sources for the supported services.

    Note: Credentials stored as a secret in a vault are not affected by this setting. Vaults are a different security mechanism.

  8. If available, click Test connection.

  9. Click Create. The connection appears on the Assets page. You can edit the connection by clicking the connection name on the Assets page.

  10. Add tables, files, or other types of data from the connection by creating a connected data asset.

  11. Optional: Convert the connection asset to a platform-level connection that can be accessed from any feature in Cloud Pak for Data. Required permission: You must be an Editor or Administrator on the Platform connections page (Platform assets catalog).

    1. Locate the connection in the project's Assets tab in the Data access section.
    2. From the overflow menu (overflow menu), select Publish to catalog.
    3. Select Platform assets catalog and click Publish.
    4. You can confirm that the connection is added by going to Data > Platform connections.

Connections with personal credentials are marked with a key icon (the key symbol for private connections) on the Assets page and are locked. If you are authorized to access the connection, you can unlock it by entering your credentials the first time you select it. This is a one-time step that permanently unlocks the connection for you. After you have unlocked the connection, the key icon is no longer displayed. Connections with personal credentials are already unlocked if you created the connections yourself.

Watch this video to see how to create a connection and add connected data to a project.

This video provides a visual method as an alternative to following the written steps in this documentation.

Next step

Go to Data Refinery, and select the connection. Drill down to a schema, and table or view.

Learn more

Connecting to data sources at the platform level

Parent topic: Adding data to a project