Skip to content
Advertisement

Filtering ‘Where In’ Queries by ‘Is Not Null’ in Big Query

I am attempting to query a table in BigQuery programmatically, and have a WHERE-IN clause that I would like to support having NULL as the value. Current Query looks like:

I am wondering if there is a way so that I can query everything from the table for a specific date in the case that the LIST_OF_IDS input is NULL (The idea being that I want to support choosing between an inputting of a list of ids or return everything if no list of ids are given).

I tried

But got this error thrown at me:

Advertisement

Answer

If I understand correctly you are looking for this :

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement