检查雪花变体中是否存在密钥

问题描述 投票:0回答:1

是否有功能可以检查雪花变体字段中是否存在键?

key snowflake-cloud-data-platform exists
1个回答
0
投票

不确定确切的用例,但是您只能获取键值,如果键不存在,它将返回null。

select  parse_json('{hello: "world"}') as V,
    iff(V:world is null, 'There\'s no world key', V:world);
© www.soinside.com 2019 - 2024. All rights reserved.