How to get array length / size of a nested field in big query
Consider the below table in big query, where I have a repeated nested field called
How can I get the length of the repeated nested field
article_id = 2049807276, the length of the author names would be 2.
You should use
#standard SQL SELECT article_id, ARRAY_LENGTH(author_names) len FROM `table`
Read great educational content like this and a lot more !
Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too