Redshift JSON查询陌生感

时间:2015-11-11 20:13:27

标签: amazon-redshift

我正在尝试查询包含JSON的Redshift表的字段。

此查询运行良好:

select *
from daily_process.staging 
where source_id is null 
and json_extract_path_text( misc , 'sourceidlist' ) is not null 
and request_date >= '2015-11-10'

但添加第二个json_extract_path_text子句会导致 JSON解析错误

select *
from daily_process.staging 
where source_id is null 
and json_extract_path_text( misc , 'sourceidlist' ) is not null 
and json_extract_path_text( misc , 'sourceidlist' ) <> ''  <-- adding causes error
and request_date >= '2015-11-10'

有人看到我做错的事吗?

0 个答案:

没有答案