Connecting to a data source in DataStage

You can connect to remote data sources with a flow connection, a project connection, or a platform connection.

You can connect to a remote data source in the following ways.

Create a flow connection in DataStage

Flow connections are specific to a DataStage flow.

Benefits:

  • No need to create a separate connection. The connection properties are within the flow.
  • You can parameterize all the connection properties. Parameterized properties make it easier to migrate the flow. For example, if you move from a development environment to a production environment, you need to change the only parameter values.

Steps:

  1. In DataStage, drag a connector to the canvas and double-click it.
  2. In the Stage tab under Properties, go to Connection > View connection. The <Flow connection> option is selected by default.
  3. Enter the connection details, and then click Save. For guidance, see the information for the connection at Connectors for projects and catalogs. To parameterize a connection property, click the Parameterize icon {#}. For instructions, see Parameters and parameter sets.
Note:

Authentication with credentials that are stored in a vault is not supported for flow connections.

If the connection requires that you upload a JAR file (for example, the Exasol, SAP Bulk Extract, SAP Delta Extract, SAP HANA, or SAP IDoc connection), you must create the connection in a project or create a platform connection. See Importing JDBC driver files for data sources for the procedure and required permissions to upload the JAR file to Cloud Pak for Data.

Not all connectors support flow connections. See Limitations and known issues for exceptions.

For information on migrating DataStage jobs with connections from traditional DataStage, see Enabling flow connections at Migrating DataStage jobs.

Create a connection asset in a project and then select the connection in DataStage

Benefit: You can share with the connection with other users in the project. The connection can be used with other tools or services in the project. (DataStage does not support connections that are created in a catalog. However, you can add a connection to a project from a catalog, and then DataStage can use the connection.)

Steps:

  1. In the project, go to Assets > New asset > Data access tools > Connection.
  2. Select a connector and create the connection. For more information, see Adding connections to projects.
  3. Go to DataStage, expand Connectors, and then add a connector to the canvas in one of the following ways:
    • Drag the Asset browser to the canvas, and then select a connection. You can drill down to select specific data. The associated connector is added to the canvas.
    • Drag a connector to the canvas and double-click it. Open its Stage tab. Go to Properties > Connection > View connection and select the connection.

Create a platform connection and then select the connection in DataStage

A platform connection is a connection asset in the Platform assets catalog.

Benefit: You can share the connection across services and projects. The connection can be used in other tools and shared with multiple users.

Steps:

  1. Go to Data > Platform connections. Click New connection.
  2. Select a connector and create the connection. For more information, see Connecting to data sources at the platform level.
  3. Go to DataStage, expand Connectors, and then add a connector to the canvas in one of the following ways:
    • Drag the Asset browser to the canvas, and then select a connection. You can drill down to select specific data. The associated connector is added to the canvas.
    • Drag a connector to the canvas and double-click it. Open its Stage tab. Go to Properties > Connection > View connection and select the connection.