What is the difference between azure.data.tables vs microsoft.azure.cosmos.table?

Emil Alipiev 271 Reputation points
2021-12-06T15:25:03.247+00:00

I am trying to implement a Azure functions using Azure table storage as DB and i have came across with 2 different nuget packages and namespaces azure.data.tables and microsoft.azure.cosmos.table.
if i understand correctly azure.data.tables supports multiple languages like c#, phyton etc.
is there any other difference between those 2? is the azure.data.tables latest and newes version?
I can see that microsoft.azure.cosmos.table namespace supports more queries if i am not mistaken.
Which one is the recommended if we start a project today?

Azure Table Storage
Azure Table Storage
An Azure service that stores structured NoSQL data in the cloud.
159 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Oury Ba-MSFT 16,901 Reputation points Microsoft Employee
    2021-12-07T17:20:43.373+00:00

    Hi @Emil Alipiev Thank you for posting your question on Microsoft Q&A.

    Azure.data.Tables packages is our newer track2 library that is being actively maintained. We encourage existing customers to migrate from microsoft.azure.cosmos.tables -> azure.data.tables.

    I can see that microsoft.azure.cosmos.table namespace supports more queries if i am not mistaken
    *****Can you elaborate on "more queries"?*****

    Additional Info:

    Microsoft.azure.cosmos.table is a client library which enables working with the Microsoft Azure CosmosDB Table API as well as Azure Table Storage.
    When used with Cosmos DB Table API, the library enables support for global distribution, automatic secondary indexes, dedicated throughput, and single-digit millisecond latency.
    The Azure Tables client library can seamlessly target either Azure Table storage or Azure Cosmos DB table service endpoints with no code changes.

    Regards,
    Oury

    2 people found this answer helpful.

  2. Saurabh Sharma 23,766 Reputation points Microsoft Employee
    2021-12-15T00:46:21.617+00:00

    @Emil Alipiev
    I think you are looking for LINQ style query as mentioned in the documentation over here. So, your code would look like below -

    157653-image.png

    Sample Data from CosmosDB Table:
    157645-image.png

    Here OfficeSupplyEntity is a Azure.Data.Tables.ITableEntity.
    You can also find additional samples to use Azure.Data.Tables over here.

    Please let me know if you have any other questions.

    Thanks
    Saurabh