Does anyone know if Talend can use dynamic soql so that a 'only retrieve sobjects that have systemmoddate > last time we synced' retrieval can be done ?

I've tried using variables but the connector doesnt seem to like the idea of merging them into a manual SOQL string.

I dont see how Talend is a viable piece of middleware if it cannot do this, so interested to learn from those who've managed it!



I've sorted this and yes can do it.

You need to create a global var, in my example its LASTACCOUNTQUERY. Populate this prior to executing the query, likely via a tJava component.

Then, in your connection metadata, define the SOQL query manually. When you want to add one of your merge fields, use CTRL+SPACE to access a list of available options.

Your result will end up something like the following:

"select id,name from account where systemmodstamp >" + ((String)globalMap.get("LASTACCOUNTQUERY")) + " order by systemmodstamp DESC limit 100"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.