Four Stars

tmssqlinput connection gets initiated before context load from the external file

Hi Team,

 

I'm trying to configure some simple jobs as below.

 

Here I'm trying to fetch the DB connection parameters from the external property files. So for that I've designed the job as below.

 

But on executing the job it tries to get the connection to the DB even before loading the properties file, due to which the job fails.

 

I'm using Big Data sandbox 6.3 as it's seen in the screenshot.

 

A quick help will be much appreciated.

 

Regards,

Mitul Vyas

 

Job Design and Run startJob Design and Run start

 

 

Job Design and Run endJob Design and Run end

 

 

  • Big Data
  • Sandbox
8 REPLIES
Five Stars

Re: tmssqlinput connection gets initiated before context load from the external file

Are you sure the context values are getting loaded properly?

The Job design looks fine. I think there's an issue with fetching the values from the external properties file.

Make sure the context name that you declared and the key column values in the external properties file are exactly matching.

 

Also you can use the tJava component to print the context value before the MySQL component starts; just to see if the values are what you want it to be.

Four Stars

Re: tmssqlinput connection gets initiated before context load from the external file

Hi,

 

Thanks for the Response.

 

Yes. it's picking the proper file. even the values are getting loaded properly. I checked the same by displaying the context variables using tJava component.

 

The problem is job is trying to make the SQL connection even before the context load. Which should not be as per the job design. But, unfortunately, that's how it's execution order.

 

Regards,

Mitul Vyas

Five Stars

Re: tmssqlinput connection gets initiated before context load from the external file

I am sure you must have tried this but try to see if you can remove all the links and connect them again. Remove all the twarn and tdie components for now. Just connect the context load subjob to the mysql component and try again.

If that doesn't fix the issue, try to create a new job and copy the subjobs to it. It could be a weird bug of some kind.

 

Also if it's possible, can you share a screenshot of how you configured your mysql component?

Four Stars

Re: tmssqlinput connection gets initiated before context load from the external file

Hi All,

 

Thanks everyone.

 

Could figure out the reason.

 

Actually I was trying to do the error logging at the same DB which was being used for data extraction. For which I referred the context parameters. But Talend tries to get the connection for error (Stat, Logs and Meter) logging even before loading the context parameters from the files.

 

Now, could someone advise me whether I could use the dynamic data-logging parameters.

 

Thanks in advanced.

 

Regards,

Mitul Vyas

Four Stars

Re: tmssqlinput connection gets initiated before context load from the external file

Hi,

 

Could someone please respond?

 

Regards,

Mitul Vyas

Five Stars

Re: tmssqlinput connection gets initiated before context load from the external file

could you try loading the context values by connecting it with a pre-job component?

That might work.

Four Stars

Re: tmssqlinput connection gets initiated before context load from the external file

No man.

 

That too does not work. But you can modify the data directly at the properties file within your executable file structure.

 

Regards,

Mitul Vyas

Nine Stars

Re: tmssqlinput connection gets initiated before context load from the external file

Can you show us how your DB connection is configured please? This should be working. Are you sure that your context variables are set correctly? Can you switch off the DB component and just use a System.out call in a tJava in place of the DB component?

Rilhia Solutions