AzureRmStorageTable icon indicating copy to clipboard operation
AzureRmStorageTable copied to clipboard

Added batch remove table rows function

Open KrystianNiepsuj opened this issue 3 years ago • 3 comments

  • Added new function (Remove-AzTableRows) to handle deleting items in a batch for faster and more consistent performance. The batching process handles grouping items by partition key.

  • Added pester v4 tests to tests file to include test coverage of the batching function

KrystianNiepsuj avatar Jun 15 '21 12:06 KrystianNiepsuj

Hi Paulo, I was recently having issues removing items efficiently on a project I was working on. I have added this function and wanted to include it - in case it can be helpful to anyone else. Although github reports large amounts of changes - i changed nothing other than adding a function to the AzureRmStorageTableCoreHelper module, the tests module, and the psd1 file.

I considered adding this to the Remove-AzTableRow function - but with the additional logic I felt like it would clobber up the size of that function to a degree that was uncomfortable. Please let me know if you feel I should make any changes or if you disagree with this feature. Thanks!

KrystianNiepsuj avatar Jun 15 '21 12:06 KrystianNiepsuj

Hi @KrystianNiepsuj , thanks for the contribution, I will evaluate, but would like to check if you can clean up with a new PR since it shows that everything is a new file. This will help future references to the PR.

Another question is, there is this PR #69 , which seems interesting and I'm interested on that approach, is that something you could use for the batch deletions?

paulomarquesc avatar Aug 31 '21 17:08 paulomarquesc

@KrystianNiepsuj , I had a quick look at this, can you please rename the cmdlet to something like Remove-AzTableRowBatch instead of using plural? Plurals are not compliant with PowerShell design guidelines.

paulomarquesc avatar Feb 02 '22 00:02 paulomarquesc