google public-data-set 에서 github의 languages 에 접근하려고 했을때 Cannot access field name on a value with type ARRAY<STRUCT<name STRING, bytes INT64>> at [1:17] 와 같은 이슈가 발생했습니다.

 

table에서 해당 컬럼이 array 형태이기 때문에 이를 Flatten 하기 위해서 UNNEST 함수를 사용해야 합니다. 

select count(distinct language.name) from table -> select count(distinct n.name) from table, UNNEST(language) as n