我有以下查询:
SELECT 'curl -s http://www.mde.operator.com/MRE/api?profile=CANCEL_AUTH&mode=assync-oneway&Auth='||json_extract_path_text(external_reference_id,'transactionIdAuth') + '&NUM=' + phone FROM dbo.cancelled WHERE id like '%Auth%';
它会带来超过 60,000 个结果,但是 json 损坏了,我无法删除损坏的行。
有什么方法可以跳过显示任何类型错误的行吗?
注意:它不是空行。
我已经尝试过:
json_extract_path_text(regexp_replace(event_properties,'\\\\.',''),'someValue')
最佳答案
不过,您可以通过将 json_extract_path_text
函数的 null_if_invalid
参数设置为 true
来使它们成为空行。
来源:https://docs.aws.amazon.com/redshift/latest/dg/JSON_EXTRACT_PATH_TEXT.html
关于sql - 在 Redshift 中使用 json_extract_path_text 时如何跳过错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48590695/