I am trying to create a task in schema1 which is calling a procedure proc1 in schema1. The procedure has multiple insert table statements which inserts data into schema2.table2 and schema3.table3 from schema1.table1. On execution the procedure throws an error with schema2.table2 does not exist or not authorized.
On running the procedure without the task, it executes and successfully completes with the role used for creation of the task.
Can someone help on this please.