I'm currently in need to execute a stored procedure just before I load data into a table.
I've tried with a stored procedure activity but it still has a time (around 10 secs) to start the copy and it will interfere with other processes we have running.
Is there a faster way? I also looked at Azure functions but I dont think it should be that complicated.
The only way I can think of running it immediately before doing the actual copy is at the pre-copy script on the sink tab of the copy activity.
Any query you write there will be run before inserting the data, so if your database is a postgres (as you tagged the question) you may write:
Call functionName()
If it was a sql server:
exec functionName
Hope this helped!!