snowflakedb / SnowAlert

Security Analytics Using The Snowflake Data Warehouse
Apache License 2.0
184 stars 57 forks source link

[fix] Fix parsing of "undefined" in VARIANT results #578

Closed sfc-gh-afedorov closed 2 years ago

sfc-gh-afedorov commented 2 years ago

Snowflake sometimes returns an "undefined" value inside of arrays created by SQL expression CREATE_ARRAY(NULL). This fixes it by using the process described in https://skeptric.com/demjson/

Tested by pasting new code into ipython and running formerly invalid value through load_js_object(x) to make sure it parsed and running automated tests.