Adding connections to data sources in a project
You need to create a connection asset for a data source before you can access or 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.
See Connectors for the list of data sources.
To create a new connection in a project:
-
Go to the project page. Click the Assets tab.
-
Click New asset > Connection.
-
Choose the kind of connection:
- Select New (the default) to create a connection at the service level.
- Select From platform to select a connection that has already been created at the platform level.
-
Choose a data source.
-
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. If you enter an asset name that is the same as an existing asset with the same data source type, then the existing asset is updated. If the data source type is not the same, then the existing connection asset is deleted and a new one is created.
-
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, if you use personal credentials and another user changes the connection properties (such as the hostname or port number), the credentials are invalidated to prevent malicious redirection.
- Shared: With shared credentials, all users access the connection with the credentials that you provide. The default setting is Shared. Shared credentials can potentially be retrieved by a user who has access to the connection asset. Because the credentials are shared, it is difficult to audit access to the connection, to identify the source of data loss, or identify the source of a security breach. An administrator can disable shared credentials.
-
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.
-
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 Accessing data sources with the Flight service 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. -
If available, click Test connection.
-
Click Create. The connection appears on the Assets page. You can edit the connection by clicking the connection name on the Assets page.
-
Add tables, files, or other types of data from the connection by creating a connected data asset.
-
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 for the Platform assets catalog.
- Locate the connection in the project's Assets tab in the Data access section.
- From the overflow menu
, select Publish to catalog.
- Select Platform assets catalog and click Publish.
- You can confirm that the connection is added by going to Data > Platform connections.
Connections with personal credentials are marked with a key icon 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 to learn the concepts and tasks in this documentation.
Next step
Go to Data Refinery, and select the connection. Drill down to a schema, and table or view.
Learn more
Parent topic: Adding data to a project