Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Table Storage vs CosmosDB with Python

I am trying to access Azure Table Storage via python.

Following an old walkthrough here: https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-python#install-the-azure-storage-sdk-for-python

but the Python SDK it references for Azure Tables specifically (https://github.com/Azure/azure-storage-python) has been moved/deprecated in favor of Azure Cosmos DB SDK.

In the deprecation note, they say to use this SDK: https://github.com/Azure/azure-cosmosdb-python

In the documentation for that SDK, they refer you to https://azure.microsoft.com/en-us/develop/python/

In the Table Storage and link on that page, it refers you back to the first link (!!)

============

1) All I want to do is query traditional Azure Table Storage (NOT CosmosDB) with a Python SDK

2) Ideally, that Python SDK also includes the encryption/decryption capability for Azure Tables.

What am I missing / does that python SDK still exist anywhere?

Note: I see https://github.com/Azure/azure-cosmosdb-python/tree/master/azure-cosmosdb-table but this SDK seems to require a CosmosDB deployment -- it can't connect to traditional AzureTables. Is my understanding incorrect?

Thanks for any help you can offer.

like image 518
ASX Avatar asked Jan 21 '18 22:01

ASX


People also ask

What is the difference between Azure Table storage and Cosmos DB?

Azure Table Storage supports a single region with an optional read-only secondary region for availability. Cosmos DB supports distribution from 1 to more than 30 regions with automatic failovers worldwide. You can easily manage this from the Azure portal and define the failover behavior.

Is CosmosDB deprecated?

The support for cosmos DB accounts using Azure storage explorer will be deprecated in future versions that is why you can see deprecated is showing besides cosmos DB accounts option.

Is Azure Table storage deprecated?

Azure table storage is being deprecated in favor of Azure Cosmos DB.

What is a benefit of the Azure Cosmos DB Table?

Azure Cosmos DB provides well-reasoned trade-offs between consistency, availability, and latency. Azure Cosmos DB offers five consistency levels to Table API developers, so you can choose the right consistency model at the table level and make individual requests while querying the data.


1 Answers

The Azure CosmosDB Table SDK IS Azure Storage Tables SDK. Re-branding is part of some re-org inside Microsoft, but this is the same code and same endpoint, same everything.

Storage SDK was one big client, it was split into Table/Queue/Blog/Files packages, in order to give ownership of Table to CosmosDB team.

https://docs.microsoft.com/en-us/azure/cosmos-db/table-support

The new Azure Cosmos DB Python SDK is the only SDK that supports Azure Table storage in Python. This SDK connects with both Azure Table storage and Azure Cosmos DB Table API.

You can also compare the code, you'll see:

  • https://github.com/Azure/azure-storage-python/tree/v0.36.0/azure/storage/table
  • https://github.com/Azure/azure-cosmosdb-python/tree/master/azure-cosmosdb-table/azure/cosmosdb/table

(I work at MS in the Azure SDK for Python team)

like image 154
Laurent Mazuel Avatar answered Oct 06 '22 01:10

Laurent Mazuel