I have a nested table that I can not access all fields of using standard google bigquery.
For example this query fails
SELECT *
FROM
(
SELECT
rev_info.user.id as player_id,
rev_info.purchase.total.currency as currency,
rev_info.purchase.total.amount as REV
,rev_info.purchase.virtual_items.items.sku as sku
FROM `gcs.rev`
)
WHERE currency = 'USD'
with error
"Error: Cannot access field sku on a value with type ARRAY> at [9:59]"
however
SELECT *
FROM
(
SELECT
rev_info.user.id as player_id,
rev_info.purchase.total.currency as currency,
rev_info.purchase.total.amount as REV
--,rev_info.purchase.virtual_items.items.sku as sku
FROM `gcs.rev`
)
WHERE currency = 'USD'
This query is fine.
Also note that
SELECT
rev_info.purchase.virtual_items.items.sku as sku
FROM `gcs.rev`
fails with the same error as above.