'How many predicates are allowed in a WHERE clause?
We are dynamically building a SQL statement in which the WHERE clause will consist of multiple predicates joined together using OR
SELECT cols
FROM t
WHERE (t.id = id1 AND t.PARTITIONDATE = “yyyy-mm-dd”)
OR (t.id = id2 AND t.PARTITIONDATE = “yyyy-mm-dd”)
OR (t.id = id3 AND t.PARTITIONDATE = “yyyy-mm-dd”)
OR (t.id = id4 AND t.PARTITIONDATE = “yyyy-mm-dd”)
etc…
What is the maximum number of conditions that BigQuery allows in such a SQL statement?
I’ve looked at the documentation (https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#where_clause) but the answer is not there.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
