services | platforms | author |
---|---|---|
storage |
java |
sribhat-MSFT |
This demo demonstrates how to perform common tasks using Azure Table storage and Azure Cosmos DB Table API including creating a table, CRUD operations, batch operations and different querying techniques.
If you don't have a Microsoft Azure subscription you can get a FREE trial account here
- Go to your Azure Cosmos DB Table API instance in the Azure Portal and select "Connection String" in the menu, select the Read-write Keys tab and copy the value in the "CONNECTION STRING" field.
- Open the src/resources/config.properties file and set StorageConnectionString to your connection string.
- Make sure you have maven and a reasonably new Java SDK installed
- Run 'mvn install' from the root of the directory
- Run 'java -jar target/storage-java-table-0.0.1-SNAPSHOT-jar-with-dependencies.jar' from the root of the directory
-Introduction to Azure Cosmos DB Table API
This sample can be run using either the Azure Storage Emulator or with your Azure Storage account by updating the config.properties file with your connection string.
To run the sample using the Storage Emulator (Only available on Microsoft Windows OS):
- Download and Install the Azure Storage Emulator here.
- Start the Azure Storage Emulator by pressing the Start button or the Windows key and searching for it by typing "Azure Storage Emulator". Select it from the list of applications to start it.
- Open the src/resources/config.properties file and set StorageConnectionString = UseDevelopmentStorage=true.
- Make sure you have maven and a reasonably new Java SDK installed
- Run 'mvn install' from the root of the directory
- Run 'java -jar target/storage-java-table-0.0.1-SNAPSHOT-jar-with-dependencies.jar' from the root of the directory
To run the sample using the Storage Service:
- Go to your Azure Storage account in the Azure Portal and under "SETTINGS" click on "Access keys". Copy either key1 or key2's "CONNECTION STRING".
- Open the src/resources/config.properties file and set StorageConnectionString to the previously copied value..
- Make sure you have maven and a reasonably new Java SDK installed
- Run 'mvn install' from the root of the directory
- Run 'java -jar target/storage-java-table-0.0.1-SNAPSHOT-jar-with-dependencies.jar' from the root of the directory