Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
georgefrs
Contributor
Contributor

Configuring a Datasource in Studio for Routes

Hello,

We've followed the instructions here:

https://help.talend.com/r/en-US/8.0/esb-container-administration-guide/creating-datasource-in-talend-runtime-container-using-ops4j

to create a Datasource in the Karaf Runtime using OPS4j.

We are on Talend Cloud 8.0 and only using on premise Talend Remote Engines / Runtimes. We followed the steps above but adapted for our DB Type (IBM DB2). The connection is successful when using jdbc:query on the karaf console or deploying a route to the Runtime from TMC.

What I am currently struggling with is defining this same datasource in Talend Studio so that we can run the Routes directly in Studio. We don't want to have to deploy or use remote execution every time we want to test the Route.

Is this possible? Is there documentation or a guide for doing this? I tried Google and searching the forum but I couldn't find anything relevant.

Any help would be greatly appreciated!

Labels (5)
2 Replies
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @George Stanley​ 

 

I believe the datasource only works when you deploy the route on the runtime.

 

I'm assuming it from a standard job component but I believe the same applies to the route components. The tDB2Input component has an option "Specify a data source alias" and according with its documentation "This option works only when you deploy and run your Job in Talend Runtime"

 

 

E2Miller
Contributor
Contributor

To define the same datasource in Talend Studio for running routes directly, you can follow these steps:

 

Open Talend Studio and go to the "Window" menu.

Select "Show Perspectives" and choose "Integration".

In the Integration perspective, go to the "Metadata" view.

Right-click on "DB Connections" and select "Create DB Connection".

In the "Create DB Connection" dialog, select the appropriate database type (IBM DB2 in your case).

Enter the necessary connection details, such as the hostname, port, database name, username, and password.

Click "Test Connection" to ensure that the connection is successful.

Click "Finish" to create the DB connection.

 

Once the DB connection is created in Talend Studio, you can use it in your routes directly without the need for remote execution. To use the DB connection in your routes, follow these steps:

 

Open your route in the Route Editor.

Drag and drop the appropriate database component from the Palette onto the canvas (e.g., "DB Input", "DB Output", etc.).

In the component properties, select the DB connection you created from the drop-down list or click the "..." button to browse and select the connection.

Configure the component as per your requirements, specifying the table, query, columns, etc.

Save your route and execute it within Talend Studio.

By defining the datasource in Talend Studio, you can directly test and run your routes without the need for deploying to the Talend Runtime or using remote execution. This allows for easier development and testing in a local environment.

 

 

Note: Make sure that the required JDBC driver for IBM DB2 is available in your Talend Studio installation. If it's not available, you may need to download and install the driver separately before creating the DB connection.

 

I hope this helps! Let me know if you have any further questions. mybkexperience