Complete the code to create a new Azure Table client.
from azure.data.tables import TableServiceClient connection_string = "DefaultEndpointsProtocol=https;AccountName=example;AccountKey=key;EndpointSuffix=core.windows.net" service = TableServiceClient.from_connection_string([1])
The from_connection_string method requires the connection string to create the TableServiceClient.
Complete the code to create a new table named 'Customers'.
table_client = service.get_table_client(table_name=[1])
table_client.create_table()The table name must be 'Customers' as specified.
Fix the error in the code to insert an entity into the table.
entity = {'PartitionKey': 'USA', 'RowKey': '001', 'Name': 'John Doe'}
table_client.[1](entity=entity)To add a new entity, use insert_entity. Other methods do not insert new data.
Fill both blanks to query entities with PartitionKey 'USA' and RowKey greater than '005'.
filter_query = "PartitionKey eq '[1]' and RowKey [2] '005'" entities = table_client.query_entities(filter=filter_query)
The filter must check PartitionKey equals 'USA' and RowKey greater than '005'.
Fill all three blanks to update the 'Name' property of an entity with PartitionKey 'USA' and RowKey '001'.
entity = table_client.get_entity(partition_key=[1], row_key=[2]) entity['Name'] = [3] table_client.update_entity(entity=entity)
Retrieve the entity with PartitionKey 'USA' and RowKey '001', then update the 'Name' to 'Jane Smith'.