Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
welshsteve
Creator
Creator

Job ignoring context variable value at runtime

All of a sudden the past week, our jobs have stopped working correctly. Not sure if any auto updates have come down, but the jobs affected have not been changed at all.

The issues we are having are when we run jobs with context variables that have the Prompt tick box ticked.

Normally with the tick box ticked, when the job runs, it will prompt you with the defaults for these variables, allowing you to overwrite them at runtime. We use this functionality quite extensively, especially with database connection contexts to allow us to specify the server and database name we wish to run the job against.

This has been working perfectly fine, but in the last week, this has stopped working correctly.

Here's an example.

0693p00000AFUREAA5.png

As you can see from the screenshot, this job is setup with a database connection context, with the tick box ticked on prompts for the some of the parameters, including the database name.

In the screenshot, you can see the database name is set to "Transform_DB_0408"

This is how the tDBConnection_1 component is set up. As you can see it is being told to use this context.

0693p00000AFUHpAAP.png

From the below screenshot, you can see that the tDBRow_1 component is being told to use and existing connection, and the connection it should use is the details in the tDBConnection_1 component.

0693p00000AFUWTAA5.png

When I run this job, I get the expected prompts:

0693p00000AFUYoAAP.png

As you can see I am changing the default database name to a different database. So the job should now use this database.

However, it does not, and errors. The error is suggesting it is trying to connect to the default database "Transform_DB_0408".

0693p00000AFUb4AAH.png

It has never done this before, and I have no idea why this has all of a sudden started happening, but it is very annoying and causing us all sorts of issues.

Does anybody have any ideas at all?

Thanks

Steve

Labels (2)
5 Replies
welshsteve
Creator
Creator
Author

Just to add to this, this is not happening for all jobs that use the context/connection, so it is something weird going on with the jobs/components themselves.

musbas
Contributor
Contributor

Any solution to this?? Facing this issue with one of our jobs, when I select prompt for a context variable, it does not pick the value I put in the prompt, instead keeps the default value and if I remove the default value, it does not pick a value at all!

Shicong_Hong
Support
Support

@musbas which version of Studio are you using? The issue only occurs in this job or it happens to all jobs even a simple job? Can you please provide extra information that helps us to reproduce the issue? Thank you!

 

musbas
Contributor
Contributor

I am using V 8.0.1 of Studio. I created a new job with the same specifications and it was able to read the value from the context prompt, however, when I do the same thing in a new version of the original job, I get the same issue: I have a tDBInput component which uses a Snowflake Connection and then a manual query to read from Snowflake. The where condition is set to pick a value from my context variable. However, when I run the job with the context variable set to prompt, and I put in the context variable when prompt, the job does not pick the value. 

ConfiDential
Contributor II
Contributor II

Hey,

I've got the same issue. In my case Talend (version 7.3.1) is defaulting to a previously used value I entered into the prompt window. I used the Linux CMD tool grep to find occurrences of this string in the projects files and found two distinct places: 

1) <project-dir>/poms/jobs/process/<path-to-job>/src/main/resources/<project-name>/<job-name>/contexts/<env-name>.properties

2) <project-dir>/poms/jobs/process/<path-to-job>/target/classes/<project-name>/<job-name>/contexts/<env-name>.properties

Seems to me like the same file is the culprit. Maybe Talend stopped synchronizing the project directory content with the values displayed in the GUI?