Forum Discussion
P_work
1 year agoHelper I
Copy activity SFTP is triggering twice on file create event
A trigger that is set to trigger when a file is created in the Lakehouse triggers twice when the file is create with Copy SFTP activity. What would be needed to have trigger fire once? Note, uploadi...
- 1 year ago
Hi P_work ,
Thank you for reaching out to Microsoft Fabric Community.
Your trigger fires twice because the Copy activity creates temp files first, then renames them. each counts as a "file created" event.
Set the trigger to fire only on final files by:
1. Filtering by file extension (e.g., .csv, not .tmp)
OR
2. Copy to a staging folder, then move the completed file to the monitored folder.
This ensures the trigger fires only once per actual file.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly.
Thank you.