我在 bigquery 中有一個結構陣列。我想回傳一個結構體陣列,但是該陣列結構體的欄位比原始結構體少。
例子:

我想要相同的結果,但沒有 Skills.Id。
我試圖做這樣的事情,但
SELECT [(select struct(dd.Level as Level, dd.TypeId as typeid)
from unnest(dd.Skills) as dd )] as skills
FROM tablee dd
但得到一個例外:
Scalar subquery produced more than one element
uj5u.com熱心網友回復:
嘗試ARRAY而不是[]:
SELECT ARRAY(select struct(dd.Level as Level, dd.TypeId as typeid)
from unnest(tablee.Skills) as dd) as skills
FROM tablee
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/344772.html
標籤:sql 谷歌-bigquery
