Soumya Ghosh
04/21/2025, 8:32 AMJson document as string - '[{"key":"1","value":1},{"key":"2","value":2},{"key":"3","value":3}]'
JSON_QUERY(<list_of_objects>, 'lax $[?(@.key=="2")]')
-- getting output '[{"key":"2","value":2}]'
Now I want extract an object from the json list of objects dynamically, say based on column value of Flink table.
JSON_QUERY(<list_of_objects>, CONCAT('lax $[?(@.key=="', col1 ,'")]')
-- CodeGenException: Unsupported call: JSON_QUERY(STRING, STRING, SYMBOL NOT NULL, SYMBOL NOT NULL, SYMBOL NOT NULL) If you think this function should be supported, you can create an issue and start a discussion for it.
Also tried to with || concat operator, same error
Any way to circumvent this error?