I have the results of a Google Vision API call in BigQuery in a table with a schema that looks like:
image STRING NULLABLE
...
labelAnnotations RECORD REPEATED
labelAnnotations.description STRING NULLABLE
...
I am able to get all images that have one or more labels with a query like:
SELECT image,
count(labelAnnotations.description) as n_labels
FROM datasetid.tableid,
UNNEST(labelAnnotations) as labelAnnotations
GROUP BY 1
How do I get the image
value when there is no labelAnnotations record for a particular image? ie. the API returned an empty labelAnnotations record, or no record at all.
I'm hoping this is obvious, but attempts to use WHERE labelAnnotations IS NULL
failed.