Write Fully-Validated ROQL Query Statements

When you create an ROQL query statement on the Operations page of the Adapter Endpoint Configuration Wizard, you can fully validate your statement by pressing Test My Query. There is no limitation on this validation and this ensures that the query works correctly during runtime.

If you do not press Test My Query and instead click Next to go to the Summary page in the wizard, your statement is validated internally and errors are reported that prevent you from proceeding further. However, this internal validation has a limitation in that the query is only validated up to the WHERE clause. For example, if you create the following query:
SELECT id, contact.name.first FROM contact WHERE id=&val 
validation is only performed on the portion of the query before the WHERE clause:
SELECT id, contact.name.first FROM contact
However, if you arrange the query as follows:
SELECT id, contact.name.first FROM contact WHERE id=1

the entire query is fully validated.