sql - 雪花视图:尝试从另一个表连接数据时超出最大 LOB 大小错误
问题描述
我对雪花很陌生,我有这个视图将一个大的子表与主表连接起来。我在这个过程中需要一个数组对象。但我越来越
“超出最大 LOB 大小 (16777216) 错误”,
在尝试查询视图时。
有什么办法可以解决这个问题吗?
create or replace view SAMPLE_DB.SAMPLE_SCHEMA.V_VIEW as
select
cata.cat_key, sec.CAT_DATA
from SAMPLE_DB.SAMPLE_SCHEMA.SAMPLE_ITEM cata
left join (select sec.cat_key,
array_agg(OBJECT_CONSTRUCT(
'one_num', sec.one_num,
'two_num', sec.two_num)) CAT_DATA
from SAMPLE_DB.SAMPLE_SCHEMA.SEC_TABLE sec
group by sec.cat_key) pol on (cata.cat_key = sec.cat_key) ;
解决方案
请参考雪花社区 链接中的答案
group by & aggregate on key where there might be no data.
推荐阅读
- c# - 带有手势的 UWP C# 鼠标控制
- java - Apache Tika:从存档中提取文件名和 MIME 类型
- python - Clip or threshold a tensor using condition and zero pad the result in PyTorch
- docker - Kubernetes 从 Jfrog Container Registry 拉取镜像会提供 ImagePullBackOFF - x509
- python - Python:无法安装 python 模块“pyautogui”
- swift - 如何更新 numberOfRowsInSection 以及如何在此 tableView 中显示所有添加的值?
- python - 如何在 Windows 上将 Python .pyd 文件转换为轮子?
- docker - ADD/COPY dockerfile 命令的 `.` 目的地是否针对 WORKDIR 进行了解析?
- arrays - 最小长度未排序连续子数组
- php - 显示内容的 WordPress 自定义主题错误