How do I iterate over all the rows in a table in Snowflake and pass it to a Python function without using pandas?
I have a Snowflake table with following columns:
EmployeeID, EmployeeName, DirectReportID, DirectReportName, InDirectReportID, InDirectReportName. I have the tree structure ready using SQL recursive CTEs. I have tried CONNECT_BY but that doesn't give the depth of the table it goes from top to bottom (until EmployeeID instead of all people below a specific EmployeeID).I want to apply a Python DFS fn (that fn is also ready) to every row in my table. Is there a way I can achieve this using Python Stored Procedure in Snowflake? Is there a way to achieve tail recursion in this scenario?