I have two simple queries
set recent_date = (select Max(FILE_DATE) from "PRODUCTS");
select P.*,V.ID as Var_ID,V.Name as Var_Name, V.external_id as Var_Ext_ID, V.color, V.original_price, V.Price
FROM "PRODUCTS" P
JOIN "VARIEY" V
ON P.FILE_DATE = V.FILE_DATE
AND P.ID = V.ID
WHERE P.FILE_DATE = $recent_date
I am calling the queries from Python(running them on snowflake is returning the result) I am using the python snowflake connector and capturing the results in a Pandas dataframe. I am trying to create a stored proc or any function so I can just call the proc/func instead of running the query again, I am new to snowflake and SP and unable to create one, Will appreciate any help