We finally make it works.
It turns out that there must be a space between the operator and the variable in the WHERE clause.
So the following will not work:
WHERE LastModifiedDate >=$(vLastExecStartTime) and LastModifiedDate < $(vExecStartTime)
But this will work:
WHERE LastModifiedDate >= $(vLastExecStartTime) and LastModifiedDate < $(vExecStartTime)
We also found that the space between field name and operator can be ignore.
The error message 'Custom read failed' is not very helpful in debugging.
Have you encounter an error when fetching data from CaseHistory from Salesforce? I get an error with the SQL below.
Unable to get column information for the fields that are used in the query. Please make sure you have only one SELECT statement in a query editor. Description: Relationship queries with polymorphic key (keywords TYPEOF, Owner, Who and What) are not supported by the connector.
where CreatedDate >= 2009-01-01T00:00:00.000Z and CreatedDate <= 2009-02-01T00:00:00.000Z and Field ='Owner';
Do you have a solution in case you encounter it?