MODE= LIBNAME Statement Option

Specifies the performance mode for Google BigQuery or whether a connection to Teradata uses the ANSI or Teradata mode.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Set Control
Default: STANDARD [Google BigQuery]
ANSI [Teradata]
Data source: Google BigQuery, Teradata
Note: Support for Google BigQuery was added in SAS 9.4M9. Support was added for SAS 9.4M8 in December 2025.
See: IGNORE_FEDSQL_OBJECTS= LIBNAME option, MODE= data set option, READ_MODE= LIBNAME option, SCANSTRINGCOLUMNS= LIBNAME option, SQL Pass-Through Facility Specifics for Teradata

Syntax

Form 1: Google BigQuery:

MODE=STANDARD | PERFORMANCE

Form 2: Teradata:

MODE=TERADATA | ANSI

Syntax Description

ANSI

specifies that SAS/ACCESS opens Teradata connections in ANSI mode.

Note: This value applies to Teradata only.

PERFORMANCE

specifies that you want to enable several performance-related options.

Note: This value applies to Google BigQuery only.

STANDARD

specifies that you want to use default values for performance-related options.

Note: This value applies to Google BigQuery only.

TERADATA

specifies that SAS/ACCESS opens Teradata connections in Teradata mode.

Note: This value applies to Teradata only.

Details

Specifics for Google BigQuery

Use the MODE= option to set multiple LIBNAME options that control performance when writing data to Google BigQuery or when reading data from Google BigQuery. When you specify MODE=PERFORMANCE, these LIBNAME options are set to the following values:

  • IGNORE_FEDSQL_OBJECTS=YES
  • PROJECT_LIST="" (empty string)
  • READ_MODE=STORAGE
  • SCANSTRINGCOLUMNS=YES

To override any of the values above, explicitly specify that option and assign a different value. For example, if you set MODE=PERFORMANCE and SCANSTRINGCOLUMNS=NO, then the SCANSTRINGCOLUMNS= option is disabled.

Specifics for Teradata

This option allows Teradata connections to open in the specified mode. Connections that open with MODE=TERADATA use Teradata mode rules for all SQL requests that are passed to the Teradata DBMS. This impacts transaction behavior and can cause case insensitivity when processing data.

During data insertion, not only is each inserted row committed implicitly, but rollback is not possible when the error limit is reached if you also specify ERRLIMIT=. Any update or deletion that involves a cursor does not work.

ANSI mode is recommended for all features that SAS/ACCESS supports, and Teradata mode is recommended only for reading data from Teradata.

Example

This example does not work because it requires the use of a cursor.

libname x teradata user=myusr1 pw=XXXX mode=teradata;
 /* Fails with "ERROR:  Cursor processing is 
not allowed in Teradata mode." */
 proc sql;
update x.test
set i=2;
quit;

This example works because the DBIDIRECTEXEC= system option sends the delete SQL directly to the database without using a cursor.

libname B teradata user=myusr1 pw=XXXX mode=Teradata;
options dbidirectexec;
proc sql;
delete from b.test where i=2;
quit;
Last updated: February 3, 2026