I am trying to create a UDF2 in JavaScript language which returns set of query statements as a String based on the input we pass. Here , this String value should be appended to the where clause as SQL Text in UDF1 defined in SQL language.
for example : WHERE condition1 AND condition2 AND ( DB.SCHEMA.UDF2(PARM_1) -- This UDF2 returns a query set in String type. Now its checking as a Boolean condition in UDF1 but I want it to be concatenated as a SQL query to the existing where clause )
Please suggest me any approach to achieve this in Snowflake.
Thanks in Advance !