AZ-204 · Question #172
A development team 'PNX' is developing an application. The application will be storing its data in Azure Table storage. Below are the fields that are going to be stored in the table: - Region - Email
The correct answer is B. TableBatchOperation. To insert a batch of records into Azure Table storage, the TableBatchOperation class is used to group multiple table operations into a single transactional unit.
Question
Options
- ATableOperation
- BTableBatchOperation
- CTableEntity
- DTableQuery
How the community answered
(59 responses)- A5% (3)
- B81% (48)
- C12% (7)
- D2% (1)
Why each option
To insert a batch of records into Azure Table storage, the `TableBatchOperation` class is used to group multiple table operations into a single transactional unit.
`TableOperation` is used for single entity operations, not for grouping multiple operations into a batch.
`TableBatchOperation` is the correct class to use when preparing a batch of records for insertion into Azure Table storage. It allows multiple `TableOperation` instances, such as `Insert`, to be combined into a single atomic batch that is then executed against the table.
`TableEntity` is the base class for objects representing rows in Azure Table storage, not an operation type for batching.
`TableQuery` is used for constructing queries to retrieve data from Azure Table storage, not for inserting data.
Concept tested: Azure Table storage batch operation class
Source: https://learn.microsoft.com/en-us/azure/cosmos-db/table/table-storage-how-to-use-dotnet?tabs=azure-cli%2Cwindows#add-a-batch-of-entities-to-a-table
Topics
Community Discussion
No community discussion yet for this question.