Hi Talend community,
For a query i need the last_load datetime.
i did this using the following: tmssqlinput-> tcontextload. This works as expected
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)
Am i missing a step in the process, or is the query not written right?
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.
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.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Find out how to migrate from one database to another using the Dynamic schema
Learn how to make your data more available, reduce costs and cut your build time
Read about OTTO's experiences with Big Data and Personalized Experiences