SET OPTIONS

Use the SET OPTIONS clause to configure query behavior.

Use dataspace to specify which dataspace to query when querying a DLO. If the dataspace isn’t specified, the query returns zero records. Valid only for DLO queries, not supported for data model object (DMO) queries.

OptionValues
dataspace'<dataspaceName>' (string)

Example

Salesforce Platform objects don’t distinguish between NULL and an empty string (''). A SOQL query filtering on either value returns the same records. Data 360 DLOs treat NULL and empty string as different values. Use honorEmptyStrings to control how filtering behaves when querying DLOs.

The honorEmptyStrings option also supports simple queries for DMOs.

OptionValuesBehavior
honorEmptyStringstrueNULL and empty string are treated as different values. Filtering returns different record sets depending on whether the value is NULL or ''.
honorEmptyStringsfalse (default)NULL and empty string are treated as the same value. Consistent with querying Salesforce Platform objects.

Examples

This query returns records where EmailOptIn__c is either NULL or ''.

This query returns only records where EmailOptIn__c is an empty string.

Use explicitNamespace to enable explicit namespace resolution for a dynamic SOQL query. This option is applicable to only managed Apex, and you must pass the option as a bind variable. See Prevent Field Name Collisions in Managed SOQL Queries in the Apex Developer Guide.