I have a table in bigquery where I have a repeated nested field called author_names
.
How can I get the length of the repeated nested field author_names
?
e.g. for article_id = 2049807276
, the length of the author names would be 2.
I prefer the standard-sql syntax in bigquery.
You should use ARRAY_LENGTH()
function
as in
#standard SQL
SELECT article_id, ARRAY_LENGTH(author_names) len
FROM `table`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With