This should have been simple but turned out to require a bit of GoogleFu. I have an Azure Synapse Spark Notebook written in C# that
- Receives a list of Deflate compressed IIS files.
- Reads the files as binary into a DataFrame
- Decompresses these files one at a time and writes them into Parquet format.
Now after all of them have been successfully processed I need to delete the compressed files.
This is my proof of concept but it works perfectly.
The call to Credentials.GetConnectionStringOrCreds returns a signed SAS token that is ready for your code to attach to a storage resource uri.
You could of course use the DeleteFileAsync method if you so desire.
Hope this saves someone else a few hours of GoogleFu.