Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tcontextload string doesnt load correctly

Hi Talend community,

 

For a query i need the last_load datetime.

 

i did this using the following: tmssqlinput-> tcontextload. This works as expected

 

0683p000009M8lb.png
The issue im facing is that the where statement in the query below does not get the correct value from the contextload.(if i copy and paste the value into the where statement it works as expected)
0683p000009M8lg.png
Am i missing a step in the process, or is the query not written right?

Labels (5)
4 Replies
Anonymous
Not applicable
Author

Can you post a screenshot of your job? The flow of components is quite important when working with changing context variables. We need to see where the context variable value is changed and when the component using it is used. I suspect that your query has already been fired before the context variable value is set. By the way, you do not need to cast context variables. I assume you have set it as a String. As such, it is fine without the casting.

Anonymous
Not applicable
Author

0683p000009M8g8.png
This is how the job looks at the moment

tnewbie
Creator II
Creator II

Hi Henkiiee,

I guess single quote vs double quote is the problem...Talend looks for a " where as DB editors can work with a single quote('). In addition just ensure that your query when handed over as Dynamic SQL is in line with the underlying DB engine, for it to understand and execute.

Anonymous
Not applicable
Author

Can you show your query in your DB component? You are showing it in another tool.