SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 65916: Accessing a Google BigQuery table without including the SCHEMA= option in the LIBNAME statement might result in an error

DetailsHotfixAboutRate It

When you issue a LIBNAME statement for a Google BigQuery database without including the SCHEMA= option, all tables in the project are shown when the libref is expanded. However, if you try to access a table either by double-clicking it or by referencing it in code, it might result in an error similar to the following:

File GBQ.test_table.DATA does not exist

The Google BigQuery database does not have a default schema (dataset), so it expects that tables are qualified with the dataset where the table exists. When the SCHEMA= option is not supplied, SAS® does not qualify the table name in the queries that it passes. This behavior results in an error being generated by the database.

Click the Hot Fix tab in this note for a link to instructions about accessing and applying the software update.

The fix for this issue is to make the SCHEMA= option a required option in the LIBNAME and CASLIB statements. If you issue a LIBNAME or CASLIB statement without specifying the SCHEMA= option, an error occurs.

Here is the error that you see if you issue a LIBNAME statement without specifying the SCHEMA= option:

ERROR: CLI error trying to establish connection: Invalid connection string attribute : SCHEMA is required for this datasource
ERROR: Error in the LIBNAME statement.

Here is the error that you see if you use a CAS data connector without specifying the SCHEMA= option:

ERROR: Parameter 'datasource.schema' is required but was not specified.
ERROR: An attempt was made to convert parameter 'datasource' from 'value_list' to one of a set of alternative types, but the conversion failed.
ERROR: The action stopped due to errors.

You can specify the schema with explicit pass-through either by specifying the SCHEMA= option with the CONNECT TO statement or by qualifying the tables in the pass-through code. You will also be able to use CONNECT USING xxx; syntax to refer to a previously created LIBNAME statement in which the SCHEMA= option was specified.

The SCHEMA= option is also a required option with the FEDSQL and DS2 procedures when defining the connection parameters rather than using an already defined one.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ACCESS Interface to Google BigQueryLinux for x649.4 TS1M69.4 TS1M7
SAS SystemSAS Data Connector to Google BigQueryLinux for x64V.03.04Viya
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.