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

Special holiday offer! You and a friend can attend FabCon with a BOGO code. Supplies are limited. Register now.

Reply
smeetsh
Responsive Resident
Responsive Resident

wild card (*) not working on delete activity

Hi All,

 

I create json files through a api, which get overwritten everytime time the pipeline runs. There is a very minute chance that one day a json file  may not be overwritten since we have gotten rid of the object and are no longer interested in its history (it will be rare but possible.

I thought ..easy Ill insert a delete activity, but I can't seem to get the wildcard fucntionality to work (I am prolly being a dumbass here). I followed this link from MS and wildcards should work, and I have used  them to ingest data in a similar way

https://learn.microsoft.com/en-us/fabric/data-factory/delete-data-activity

The activity step is super simple, 

smeetsh_0-1724214862843.png

 

If I take the wildcard out and leave filename blank, it will delete all files in the subfolder, which could work, though I would like to build in some more finesse, incorporating it in a loop and target filenames more selectively.

What am I missing here?

Cheers
Hans

2 REPLIES 2
smeetsh
Responsive Resident
Responsive Resident

Thank you for the response, that is exactly what the ms acticle says, but when i try it, it is not what it does. What am I missing ? 

Anonymous
Not applicable

Hi @smeetsh ,

In data factory, allowed wild cards are *(matches zero or more characters) and ?(matches zero or single character). you can use ^ to escape if your file name has a wildcard or this escape character inside.

 

Pass output array of filtered file names from Azure functions to ForEach activity to loop each file name and use delete activity inside ForEach activity to dynamically point to the file in the iteration and delete it.

 

You can use Azure Functions activity to run Azure function in data factory. You can also look at this document: Copy and transform data in Azure Blob Storage - Azure Data Factory & Azure Synapse | Microsoft Learn

vyilongmsft_0-1724292107401.png

vyilongmsft_1-1724292141268.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.