Learn how to use Azure Table Storage to store and query large amounts of structured NoSQL data.
A step-by-step guide to creating your first table and performing basic operations using the Azure Storage REST API.
Read TutorialLearn how to interact with Azure Table Storage from your .NET applications using the official SDK.
Read TutorialUnderstand best practices for designing your partition and row keys to optimize query performance and scalability.
Read TutorialLearn how to perform efficient batch inserts, updates, and deletes to reduce the number of requests to Table Storage.
Read TutorialMaster the use of OData syntax for powerful and flexible querying of your table data.
Read Tutorialfrom azure.data.tables import TableServiceClient # Replace with your actual connection string connection_string = "YOUR_CONNECTION_STRING" table_name = "MySampleTable" def insert_entity(): try: table_service_client = TableServiceClient.from_connection_string(connection_string) table_client = table_service_client.get_table_client(table_name=table_name) entity = { "PartitionKey": "user1", "RowKey": "profile1", "Name": "Alice", "Email": "alice@example.com" } table_client.upsert_entity(entity) print(f"Entity inserted successfully: {entity}") except Exception as e: print(f"An error occurred: {e}") if __name__ == "__main__": insert_entity()
import com.azure.data.tables.TableClient; import com.azure.data.tables.TableClientBuilder; import com.azure.data.tables.models.TableEntity; import java.util.List; public class TableQuery { public static void main(String[] args) { // Replace with your actual connection string and table name String connectionString = "YOUR_CONNECTION_STRING"; String tableName = "MySampleTable"; try { TableClient tableClient = new TableClientBuilder() .connectionString(connectionString) .tableName(tableName) .buildClient(); // Query for entities with PartitionKey "user1" String filter = "PartitionKey eq 'user1'"; List<TableEntity> entities = tableClient.listEntities(filter, null, null).stream().toList(); System.out.println("Found entities:"); for (TableEntity entity : entities) { System.out.println(entity.getProperties()); } } catch (Exception e) { e.printStackTrace(); } } }