Using the RANK procedure or the SORT procedure with a Google BigQuery table might generate an error


The RANK and SORT procedures might produce an error similar to the following when you use them with a Google BigQuery table:

ERROR: CLI prepare error: Error: googleapi: Error 400: Partitioning by
expressions of type FLOAT64 is not allowed at [1:430], invalidQuery

An error similar to the following might also occur with the SORT procedure:

ERROR: SQL View WORK._ZS._ZSQL0 could not be processed because at least one
of the data sets, or views, referenced directly (or indirectly) by it
could not be located, or opened successfully.

The error occurs if a variable defined as a FLOAT64 data type is used in the VAR statement with the RANK procedure or the BY statement with SORT procedure.

This issue occurs due to a BigQuery limitation on what data types are allowed.