Not able to connect to a database using context variables talend open studio for Big Data 6.3.1

Highlighted
One Star

Not able to connect to a database using context variables talend open studio for Big Data 6.3.1

hello there

I'm using talend open studio for Big Data and trying to connect to a DB using context variables. It fails with an exception. If I connect to the DB using the values instead of context variables then everything is fine. 

 

here is a screenshot of the OracleOutput component setup with context variables1.jpgDB access component setup

if I click on the ... button (which is near the table field) - I will get the following error. It says that Network adapter could not create a connection. If I put values to all the fields but user name - then try to connect it will complain about wrong user name. Apparently the values of the context variables are not placed correctly

 

4.png

my DB connection for Oracle with the context variables. If check the connection then I will connect

2.pngDB connection in metadata

here is my context

3.pngcontext

 

I checked the generated sources and found the following

1. all my context variables were marked red (I underlined them)

2. the ContextProperties class didn't have those variables (such as  context.Ora_25_49_LoginSmiley Wink

 

I tried the same set up in Open Studio for ESB and everything was fine there. 

 

Please help me to resove the issue 

----------------------------------

url_tOracleOutput_1 = "jdbcSmiley Surprisedracle:thin:@(description=(address=(protocol=tcp)(host="
+ context.Ora_25_49_Server
+ ")(port="
+ context.Ora_25_49_Port
+ "))(connect_data=(service_name="
+ context.Ora_25_49_ServiceName + ")))";
String dbUser_tOracleOutput_1 = context.Ora_25_49_Login;

final String decryptedPassword_tOracleOutput_1 = context.Ora_25_49_Password;

String dbPwd_tOracleOutput_1 = decryptedPassword_tOracleOutput_1;
dbschema_tOracleOutput_1 = context.Ora_25_49_Schema;

--------------------------------

public class ContextProperties extends java.util.Properties {

private static final long serialVersionUID = 1L;

public ContextProperties(java.util.Properties properties) {
super(properties);
}

public ContextProperties() {
super();
}

public void synchronizeContext() {

}

}

private ContextProperties context = new ContextProperties();

public ContextProperties getContext() {
return this.context;
}

Ten Stars

Re: Not able to connect to a database using context variables talend open studio for Big Data 6.3.1

Shouldn't the values for your String variables be wrapped in quotes?

Community Manager

Re: Not able to connect to a database using context variables talend open studio for Big Data 6.3.1

Are the context variables actually imported into your job? Check the "Contexts" tab and see if they exist within the job. It sounds like they may not. Can you give us a screenshot of your "Contexts" tab?

Four Stars

Re: Not able to connect to a database using context variables talend open studio for Big Data 6.3.1

I have the same error. With the talend open studio the following error is created.

Attached error

I try to connect to an oracle database using service name.

I need help

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now