我有一個嵌套表,我無法訪問所有使用標準谷歌BigQuery的字段。無法使用谷歌bigquery取消嵌套一些字段(標準)
例如查詢失敗
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'
錯誤
"Error: Cannot access field sku on a value with type ARRAY> at [9:59]"
然而
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'
該查詢是罰款。
還要注意的是
SELECT
rev_info.purchase.virtual_items.items.sku as sku
FROM `gcs.rev`
失敗,同樣的錯誤如上。
你的意思是「無法ŧ o不嵌套...「?你甚至沒有試過!至少這是它在你的問題中看起來的樣子! –
你好,歡迎來到Stackoverflow!如果您收到的答案以任何方式幫助您或解決了您的問題,請考慮接受並投票,因爲這在此論壇中很重要:https://stackoverflow.com/help/someone-answers –