Skip to content

Commit 11b37fd

Browse files
readme fixes (Azure#17634)
Fixes to Azure#17629
1 parent 7cb210f commit 11b37fd

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

sdk/tables/azure-data-tables/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Create a table in your account and get a `TableClient` to perform operations on
160160
```python
161161
from azure.data.tables import TableServiceClient
162162
table_service_client = TableServiceClient.from_connection_string(conn_str="<connection_string>")
163-
table_name = "myTable
163+
table_name = "myTable"
164164
table_client = table_service_client.create_table(table_name=table_name)
165165
```
166166

@@ -171,19 +171,19 @@ Create entities in the table:
171171
from azure.data.tables import TableServiceClient
172172
from datetime import datetime
173173

174-
PRODUCT_ID = '001234'
175-
PRODUCT_NAME = 'RedMarker'
174+
PRODUCT_ID = u'001234'
175+
PRODUCT_NAME = u'RedMarker'
176176

177177
my_entity = {
178-
'PartitionKey': PRODUCT_NAME,
179-
'RowKey': PRODUCT_ID,
180-
'Stock': 15,
181-
'Price': 9.99,
182-
'Comments': "great product",
183-
'OnSale': True,
184-
'ReducedPrice': 7.99,
185-
'PurchaseDate': datetime(1973, 10, 4),
186-
'BinaryRepresentation': b'product_name
178+
u'PartitionKey': PRODUCT_NAME,
179+
u'RowKey': PRODUCT_ID,
180+
u'Stock': 15,
181+
u'Price': 9.99,
182+
u'Comments': u"great product",
183+
u'OnSale': True,
184+
u'ReducedPrice': 7.99,
185+
u'PurchaseDate': datetime(1973, 10, 4),
186+
u'BinaryRepresentation': b'product_name'
187187
}
188188

189189
table_service_client = TableServiceClient.from_connection_string(conn_str="<connection_string>")
@@ -197,7 +197,7 @@ Querying entities in the table:
197197

198198
```python
199199
from azure.data.tables import TableClient
200-
my_filter = "RowKey eq 'RedMarker'"
200+
my_filter = "PartitionKey eq 'RedMarker'"
201201
table_client = TableClient.from_connection_string(conn_str="<connection_string>", table_name="mytable")
202202
entities = table_client.query_entities(filter=my_filter)
203203
for entity in entities:
@@ -307,7 +307,7 @@ These code samples show common scenario operations with the Azure Data tables cl
307307
* Create and delete tables: [sample_create_delete_table.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py))
308308
* List and query tables: [sample_query_tables.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_query_tables.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py))
309309
* Insert and delete entities: [sample_insert_delete_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py))
310-
* Query and list entities: [sample_query_tables.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_query_tables.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py))
310+
* Query and list entities: [sample_query_tables.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/tables/azure-data-tables/samples/sample_query_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/tables/azure-data-tables/samples/async_samples/sample_query_table_async.py))
311311
* Update, upsert, and merge entities: [sample_update_upsert_merge_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py))
312312
* Committing many requests in a single batch: [sample_batching.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_batching.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_batching_async.py))
313313

sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def delete_from_table_client(self):
103103
await table_client.delete_table()
104104
print("Deleted table {}!".format(self.table_name))
105105
except ResourceNotFoundError:
106-
print("Table already exists")
106+
print("Table could not be found")
107107
# [END delete_from_table_client]
108108

109109

0 commit comments

Comments
 (0)