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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Brent_Reber
Regular Visitor

Get Metadata is falsely stating a file does not exist

I am running a pipeline based on the ADLS blob creation event.

 

Brent_Reber_0-1770913214178.png

 

The first item in the pipeline is the Get Metadata activity.  I am using the FolderPath and FileName parameters from the trigger.

 

Brent_Reber_1-1770913407756.png

 

The Get Metadata activity consistently returns False for the Exists argument.  The input for the Get Metadata activity contains the correct path and file name.

Brent_Reber_2-1770913663493.png

The file existed in that location at the time the pipeline ran.

 

Brent_Reber_3-1770913817207.png

Brent_Reber_4-1770913949398.png

 

I have previously included a Wait activity prior to the Get Metadata activity.  I used various wait times between 1 minute and five minutes, but the results have all been the same.  I also experienced a similiar issue with the Copy activity not finding the file while reporting the exact file path and file name from the trigger parameters before I added the Get Metadata and If Condition activities.

 

 

 

2 ACCEPTED SOLUTIONS
deborshi_nag
Resident Rockstar
Resident Rockstar

Hello @Brent_Reber

 

You have a problem in the folder path. It is taking the container name "raw", which should be excluded. Your fully qualified folder is getting translated as 

 

/raw/raw/enterprise/krisp/device_monitor/PHAC/PHAC_1_20260212161525.csv
 
You can use the code below to trim the "raw" from folderpath
 

@{if(startswith(triggerBody().folderPath, 'raw/'),
      substring(triggerBody().folderPath, 4, sub(length(triggerBody().folderPath), 4)),
      triggerBody().folderPath)}
 
I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

View solution in original post

The syntax for the solution is a little different than what you posted, but the structure of your suggestion is still intact.  I used this syntax to make it work.

 

@{if(startswith(pipeline()?.TriggerEvent?.FolderPath,'raw'),substring(pipeline()?.TriggerEvent?.FolderPath,4,sub(length(pipeline()?.TriggerEvent?.FolderPath),4)),pipeline()?.TriggerEvent?.FolderPath)}
 
Thank you for the quick response.

View solution in original post

2 REPLIES 2
deborshi_nag
Resident Rockstar
Resident Rockstar

Hello @Brent_Reber

 

You have a problem in the folder path. It is taking the container name "raw", which should be excluded. Your fully qualified folder is getting translated as 

 

/raw/raw/enterprise/krisp/device_monitor/PHAC/PHAC_1_20260212161525.csv
 
You can use the code below to trim the "raw" from folderpath
 

@{if(startswith(triggerBody().folderPath, 'raw/'),
      substring(triggerBody().folderPath, 4, sub(length(triggerBody().folderPath), 4)),
      triggerBody().folderPath)}
 
I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

The syntax for the solution is a little different than what you posted, but the structure of your suggestion is still intact.  I used this syntax to make it work.

 

@{if(startswith(pipeline()?.TriggerEvent?.FolderPath,'raw'),substring(pipeline()?.TriggerEvent?.FolderPath,4,sub(length(pipeline()?.TriggerEvent?.FolderPath),4)),pipeline()?.TriggerEvent?.FolderPath)}
 
Thank you for the quick response.

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.