azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

Support for Async Generators in TableClient.submit_transaction method

Open yashbhutoria opened this issue 5 years ago • 1 comments

  • I'm trying to delete a large number of entities from an Azure Table asynchronously

  • I have a method that returns a reference of type AsyncGenerator[Tuple[TransactionOperation, TableEntity], None] representing all the records to be deleted

  • The TableClient.submit_transaction method throws an error TypeError: 'async_generator' object is not iterable

  • The TableClient.submit_transaction method should be updated to handle AsyncIterables or

  • A new method should be made available to accept Async iterables

  • This can be done by adding 'async for' alongside the for https://github.com/Azure/azure-sdk-for-python/blob/eb5ece7d692a7c460450f65cc30ef6c7fa8b0e64/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py#L700

yashbhutoria avatar Oct 06 '21 11:10 yashbhutoria

Thanks for opening the issue, we'll investigate asap.

kristapratico avatar Oct 06 '21 15:10 kristapratico