amazon-redshift - 在 Redshift 中解析为 json 类型?
问题描述
在 Postgres 中,我可以使用以下内容解析 json:
select
*
from
(
select
json_array_elements(serialized_data :: json) -> 'fields' ->> 'rent_amount' as rent_amount,
json_array_elements(serialized_data :: json) ->> 'model' as model,
json_array_elements(serialized_data :: json) ->> 'pk' as listing_id,
*
from
public.field_history_fieldhistory
where
field_name = 'rent_amount' -- limit 30
) x
where
model = 'listings.listing'
order by
listing_id,
date_created
但是,我需要将此查询转移到 Redshift,现在我得到了错误type "json" does not exist
。
我将如何在 Redshift 中实现这一点?谢谢你。
解决方案
推荐阅读
- r - R Shiny selectizeInput - 每次拖动后拖放而不打开下拉菜单
- sql - 删除导致死锁的旧行
- vb.net - RadComboBox 上的自定义验证不起作用
- google-cloud-platform - 在 GCP 控制台中创建磁盘显示加载失败
- google-chrome - google chrome devtools 元素/属性的问题
- ios - 当我尝试运行我的项目时,我收到此错误“Command PrecompileSwiftBridgingHeader failed with a nonzero exit code”
- python - 如何pytest装饰器分配给多个功能
- javascript - 当用户在图片上向右或向左滑动时执行一个或其他功能 - RxJS
- c# - 创建共享链接 MS Graph BadRequest
- polyline - Edge data from generated polyline in Meshlab