2017-05-30 46 views
0

我正在從mule批處理面對SFA執行以下查詢。如何解決Salesforce在騾子中選擇查詢錯誤?

SELECT id, EmailADD 
FROM Contact WHERE Email = '#[dw('payload.Emailadd')]' 

它是爲4000-5000記錄工作正常,當50000分的記錄來它拋出以下錯誤:

Failed to connect/reconnect: Work Descriptor. Root Exception was: Invalid token at 1:54. Type: class org.mule.common.query.dsql.parser.exception.DsqlParsingException

Message : Broken pipe (java.net.SocketException) Element : null --------------------------------------------------------------------------------Exception stack is:Broken pipe (java.net.SocketException) (org.mule.api.DefaultMuleException) (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)

回答

0

將限制在您的查詢和檢查。

Integer maxQueryRows = Limits.getLimitQueryRows() - Limits.getQueryRows(); 

SELECT id, EmailADD 
FROM Contact 
WHERE Email = '#[dw('payload.Emailadd')]' 
LIMIT maxQueryRows