My code obtains the column list of a table I have created the attributes of this table are the contextual values of a session in snowflake such as USER,DATABASE,WAREHOUSE...ETC Afterwards it places those attribute names into an array I then try to call on these names in making an insert query and this is where I am struggling with the syntax
Because each value in my array is USER, DATABASE,WAREHOUSE I am trying to call on the context functions like CURRENT_WAREHOUSE() Can someone please help me with the syntax
for(i=0;i<arr.length;i++){
v_sqlCode = `INSERT INTO SESSION_ATTRIBUTES( arr[i] )
"VALUES ("CALL CURRENT_"+arr[i]+"()")';
}