出现以下错误
ARRAY> 类型的值无法分配给 M.preferences_testing,其类型为 STRING
MERGE table1 M USING (
select _id,ARRAY(SELECT AS STRUCT value from unnest(preferences) as p where p.name="sendOnly") as prefer from table2
) S ON M._ID = S._ID WHEN MATCHED THEN
UPDATE
SET
M._ID = S._ID,
M.preferences_testing=s.prefer // here getting error
WHEN NOT MATCHED THEN INSERT (
_ID,
preferences_testing
)
VALUES
(
_ID,
prefer
)
表2 结构
fullname mode type description
_id NULLABLE STRING
preferences REPEATED RECORD
preferences.value REPEATED STRING
preferences.name NULLABLE STRING
表1 结构
fullname mode type description
preferences_testing NULLABLE STRING
_Id NULLABLE STRING
我尝试将 ARRAY> 转换为 String 但没有任何效果
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)