Problem Note 68634: Trying to query a Google BigQuery view that is based on a partitioned table with WHERE clause being required might generate an error
Trying to query a Google BigQuery view might generate an error when the following is true:
- The view is based on a BigQuery table.
- The table is partitioned based on column(s) in the table.
- The view is defined without a WHERE clause for the partitioning variable(s).
- The table is defined with a partitioning WHERE clause being required.
- The query includes the required partitioning WHERE clause.
The error might look similar to the following:
[DIAG] SQLState:42000 NativeError:-1 "Error: googleapi: Error 400: Cannot query over table 'project.dataset.table' without a filter over column(s) 'variable' that can be used for partition elimination, invalidQuery"
The issue occurs whether or not the query includes a WHERE clause for the partitioning variable. In order to gather the metadata about the view, a query is submitted to the database that does not include the WHERE clause.
Without the WHERE clause, the error is expected.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Google BigQuery | Linux for x64 | 9.4 | | 9.4 TS1M6 | |
SAS System | SAS/ACCESS Interface to Google BigQuery (on SAS Viya) | Linux for x64 | V.03.04 | Stable 2023.04 | | Viya platform |
*
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.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2024-08-08 09:50:11 |
Date Created: | 2021-11-23 09:04:26 |