Parse Method

ParseMethod

Key Name Default Value Required

ParseMethod

Attempt To Parse Queries As SOQL First, Then SQL (2 or SOQL_FIRST)

No

Description

The query language that the connector uses to parse queries.

Select one of the following settings, or set the key to one of the values in the parentheses:

  • Attempt To Parse Queries As SOQL Only (0 or SOQL_ONLY)
  • Attempt To Parse Queries As SQL Only (1 or SQL_ONLY)
  • Attempt To Parse Queries As SOQL First, Then SQL (2 or SOQL_FIRST)
  • Attempt To Parse Queries In SQL First, Then SOQL (3 or SQL_FIRST)

Be aware that the SOQL_FIRST and SQL_FIRST parse methods may lead to different behavior for similar queries. This can occur when the connector switches between the two modes when trying to find which query language can support the inputted query. The behavior will be consistent within the same query language, however even small changes to a query can cause the connector to change which language it uses to execute the query, causing different results to be returned.

For example, SOQL and SQL handle comparisons against null values differently. SQL will return an unknown state if a comparison operator (such as = or >) is used with a null value and the result will contain zero rows. SOQL will allow such a comparison and will return results. For example, you issue the query SELECT Name FROM Account WHERE NumberOfEmployees = NULL. This query is valid SOQL, so if you are using the SOQL_FIRST mode the connector executes it in SOQL and returns values containing all non-null values. You then issue the query SELECT Account.Name FROM Account, Contact WHERE Account.Id = Contact.AccountId AND Account.NumberOfEmployees = NULL. This query is not valid SOQL but is valid SQL. The connector executes it in SQL and returns zero values as specified by the SQL specification. Both queries are similar, but the small difference in the query structure results in a different language being used to execute the queries. This changes the results.

If you are expecting a certain behavior, then use either the SOQL_ONLY mode or the SQL_ONLY mode.