I am changing the schema in the main function
db_dwh.cursor.execute("alter session set current_schema = SCHEMA_NAME")
But when I am passing this db_dwh object to a function and trying to execute a query on a table I am getting table not found error, for this again I have to set schema using:
db_dwh.cursor.execute("alter session set current_schema = SCHEMA_NAME")
Is there any way to set schema at only one place globally?
PS The job running in Hadoop environment.