I am having trouble creating a reproducible example here, because I'm not quite sure how to create a demo example table with a column of type ARRAY<STRUCT<year STRING, statCrewShirtNumber STRING>>. We have the following table:
And we are simply trying to turn year into its own column. We try the obvious:
select
customValues.year as year
from dataset.our_table
and get the error Cannot access field year on a value with type ARRAY<STRUCT<year STRING, statCrewShirtNumber STRING>>. So this is not a basic struct, but a struct inside of an array. How can we create a separate column for year?


