Help get this topic noticed by sharing it on Twitter, Facebook, or email.

SF_TableLoader query parsing bug

I think there's an issue with the way the SF_TableLoader parses SOQL queries.

When trying to locate the FROM clause, it looks for the keyword 'FROM' preceded with a space character. New lines are handled by simply replacing them with a space character before parsing the query.

A SOQL query where the FROM keyword is preceded with a tab character results in a failure to find the FROM clause, which in turn causes the procedure to fail. Additionally- the error message is confusing in this circumstance.

Suggestions:
- Replace tabs with a space character before parsing the query
- Add a check to see if the FROM clause exists, and if it doesn't then raise an error with a meaningful message. The check could be as simple as checking that IndexOF(' FROM') > 0
1 person has
this problem
+1
Reply