Unable to load context from database

Five Stars

Unable to load context from database

Hi,

 

I have a job as belowpic1.png

 I am trying to load the context of tmssqlinput from database. So the context details sit in loadcontext table in mysql. The table has the rows as shown below

pic2.png

 

Now, my when I get to the extra tab of the job the implicit job details are as follows..

pic3.png

And now when I go the contexts tab of the tmssqlcomponent, the details are as follows

 

 

pic4.png

Now when I run the job I get the error,

 

 

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
***cannot be resolved to a variable
****cannot be resolved to a variable
***cannot be resolved to a variable
*** cannot be resolved to a variable 

 

The *** is the username, password, databasename, and port, that I have hidden due to privacy guidelines


Any help on why I'm unable to get the context from database would be of great help

Thanks
Rathi

Eight Stars

Re: Unable to load context from database

Have you defined the context variables in contexts tab?
Five Stars

Re: Unable to load context from database

Yes chirgal, I have defined them as context.host, context.port, context.database, context.username, context.password

Highlighted
Eight Stars

Re: Unable to load context from database

The *** is the username, password, databasename, and port, that I have hidden due to privacy guidelines.

Referring to your above statements, I want to ask is, have you used double quotes while entering above value?

I suspect, you r missing double qoutes
Five Stars

Re: Unable to load context from database

Hi chirgal,

 

Yes, I had missed the double quotes. Thanks for that :-)

 

But, I still get the same error when I run the job

 

Thanks
Rathi

Eight Stars

Re: Unable to load context from database

It means you still missing somewhere.
How many errors are you getting now?

Which variables are unresolved now?
Moderator

Re: Unable to load context from database

Hello,

Have you already checked this online document about:TalendHelpCenterSmiley Frustratedcenario: Reading data from different MySQL databases using dynamically loaded connec...?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog