gpt4 book ai didi

javascript - BIGQuery - 函数 ARRAY_TO_STRING 没有匹配的签名

转载 作者:行者123 更新时间:2023-11-29 23:08:33 26 4
gpt4 key购买 nike

运行下面的查询后

           SELECT ARRAY_TO_STRING( reporteeNames, '|') FROM 
`appsflow-dev.PersonRequisition.ExternalNewHire`;

我遇到了错误

error

架构

Fieldname                           Type    Mode

reporteeNames RECORD REPEATED
reporteeNames.reporteeTitle STRING NULLABLE
reporteeNames.reporteeName RECORD NULLABLE
reporteeNames.reporteeName.display STRING NULLABLE
reporteeNames.reporteeName.value STRING NULLABLE

请建议针对我的模式的解决方案。

最佳答案

您需要取消嵌套数组才能选择结构内的字段:

SELECT
(SELECT STRING_AGG(reporteeName, '|')
FROM UNNEST(reporteeNames)) AS names
FROM `your-project`.dataset.table

另见 working with arrays documentation .

关于javascript - BIGQuery - 函数 ARRAY_TO_STRING 没有匹配的签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54326470/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com