google-bigquery - 如何正确使用变量 ARRAY>
问题描述
我正在尝试将结果集存储到结构数组中,但它没有按我的预期工作。也许有人知道出了什么问题。我没有任何错误消息。
declare rs ARRAY<STRUCT<created_date TIMESTAMP, unique_key STRING, complaint_description STRING>>;
SET rs =
(
ARRAY (
SELECT AS STRUCT created_date, unique_key, complaint_description
FROM `bigquery-public-data.austin_311.311_service_requests`
LIMIT 10
)
);
select * from unnest(rs);
解决方案
推荐阅读
- c - c 中的字符矩阵,我需要将矩阵作为参数传递给函数
- java - 为什么三元运算必须返回一个值?
- ios - 如何更改我在 tableView(_:willDisplayHeaderView:forSection:) 中设置的图像?
- python - 从 STEP 文件中识别特征
- statsmodels - statsmodels 错误消息:“ValueError:当 p >= .9 时 v 必须 > 1”
- web-scraping - 从 page.evaluate 输出控制台日志到本地终端?
- javascript - 单击提交按钮时执行不相关的 javascript
- javascript - 从html5视频especific第二个js捕获图像
- python - pandas .replace 删除第一个值但不添加第二个
- php - 如何在深度嵌套的 MongoDB 文档中的数组上使用正则表达式?