Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
adigkarth
Frequent Visitor

Fabric trigger invoking twice when there is a incoming file

Hi,

 

Our requirement was to invoke a pipeline whenever there is a blob created in a adls folder.This json file is written from datatbricks using dbutlis.fs.put api.We have created a reflex and chosen blobcreated as an event and in filter we have put the folder name where the json arrives

adigkarth_1-1723630643436.png

 

now the problem we are facing is,when the databricks notebook writes the file into adls,reflex is detecting the same  json file twice and triggering the target pipeline twice with the same file.We tried uploading the same file using adls portal in the same folder and the trigger was invoked only once.Could you please let us know how to resolve this 

 

 

1 ACCEPTED SOLUTION
mikeburek
Advocate II
Advocate II

I haven't set this up in Fabric pipelines yet, but I had a similar issue in a normal Azure Data Factory pipeline.

The issue was with a notebook writing a parquet file.

 

What happened is that the notebook (scala?) would first write an empty file with one API call. Then it would flush the rest of the data to the file with a different API call. To the Azure Data Factory pipeline trigger, this was technically 2 API calls to write a file. Just the first one was empty and the second one had data.

 

In the Azure Data Factory pipeline trigger, there is an option for "Ignore empty file". I do not know if this is an option in the Fabric Pipeline Trigger, but that is what I'd look for first.

 

There was also another situation where the file was supposed to stay empty because it was just a signaling file. In that case, I had to look at the event body of the event that triggered the trigger and look for the specific flush API call, and ignore the open file API call.

View solution in original post

1 REPLY 1
mikeburek
Advocate II
Advocate II

I haven't set this up in Fabric pipelines yet, but I had a similar issue in a normal Azure Data Factory pipeline.

The issue was with a notebook writing a parquet file.

 

What happened is that the notebook (scala?) would first write an empty file with one API call. Then it would flush the rest of the data to the file with a different API call. To the Azure Data Factory pipeline trigger, this was technically 2 API calls to write a file. Just the first one was empty and the second one had data.

 

In the Azure Data Factory pipeline trigger, there is an option for "Ignore empty file". I do not know if this is an option in the Fabric Pipeline Trigger, but that is what I'd look for first.

 

There was also another situation where the file was supposed to stay empty because it was just a signaling file. In that case, I had to look at the event body of the event that triggered the trigger and look for the specific flush API call, and ignore the open file API call.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

JanFabricDE_carousel

Fabric Monthly Update - January 2025

Explore the power of Python Notebooks in Fabric!

JanFabricDW_carousel

Fabric Monthly Update - January 2025

Unlock the latest Fabric Data Warehouse upgrades!