You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure Table storage is a NoSQL datastore that you can use to store and query huge sets of structured, non-relational data. The main components of the service are tables, entities, and properties. A table is a collection of entities. An entity is a set of properties. Each entity can have up to 252 properties, which are all name-value pairs. This article assumes that you are already familiar with the Azure Table Storage Service concepts. For detailed information, see [Understanding the Table Service Data Model](/rest/api/storageservices/Understanding-the-Table-Service-Data-Model) and [Get started with Azure Table storage using .NET](../../cosmos-db/tutorial-develop-table-dotnet.md).
18
18
19
-
This how-to article covers common Azure Table storage operations. You learn how to:
19
+
This how-to article covers common Azure Table storage operations. You learn how to:
20
20
21
21
> [!div class="checklist"]
22
22
> * Create a table
@@ -43,19 +43,21 @@ Install-Module AzTable
43
43
44
44
## Authorizing table data operations
45
45
46
-
The AzTable PowerShell module supports authorization with the account key via Shared Key authorization. For examples that show how to use Shared Key authorization for data access with the AzTable module, see [Use Shared Key authorization with the AzTable module](#use-shared-key-authorization-with-the-aztable-module).
46
+
The AzTable PowerShell module supports authorization with the account access key via Shared Key authorization. For examples that show how to use Shared Key authorization for data access with the AzTable module, see [Use Shared Key authorization with the AzTable module](#use-shared-key-authorization-with-the-aztable-module).
47
47
48
-
Azure Table Storage supports authorization with Azure AD. However, the AzTable PowerShell module does not natively support authorization with Azure AD. Using Azure AD with the AzTable module requires that you call methods in the .NET client library from PowerShell.
48
+
Azure Table Storage supports authorization with Azure AD. However, the AzTable PowerShell module does not natively support authorization with Azure AD. Using Azure AD with the AzTable module requires that you call methods in the .NET client library from PowerShell.
49
49
50
-
## Use Shared Key authorization with the AzTable module
50
+
The examples in this article show how to authorize table data operations via Shared Key.
51
+
52
+
## Sign in to Azure
51
53
52
54
To get started, sign in to your Azure subscription with the `Add-AzAccount` command and follow the on-screen directions.
53
55
54
56
```powershell
55
57
Add-AzAccount
56
58
```
57
59
58
-
###Retrieve list of locations
60
+
## Retrieve list of locations
59
61
60
62
If you don't know which location you want to use, you can list the available locations. After the list is displayed, find the one you want to use. These examples use **eastus**. Store this value in the variable **location** for future use.
Create a standard general-purpose storage account with locally redundant storage (LRS) using [New-AzStorageAccount](/powershell/module/az.storage/New-azStorageAccount). Be sure to specify a unique storage account name. Next, get the context that represents the storage account. When acting on a storage account, you can reference the context instead of repeatedly providing your credentials.
To create a table, use the [New-AzStorageTable](/powershell/module/az.storage/New-AzStorageTable) cmdlet. In this example, the table is called `pshtesttable`.
96
98
@@ -99,23 +101,23 @@ $tableName = "pshtesttable"
99
101
New-AzStorageTable –Name $tableName –Context $ctx
100
102
```
101
103
102
-
###Retrieve a list of tables in the storage account
104
+
## Retrieve a list of tables in the storage account
103
105
104
106
Retrieve a list of tables in the storage account using [Get-AzStorageTable](/powershell/module/az.storage/Get-AzStorageTable).
105
107
106
108
```powershell
107
109
Get-AzStorageTable –Context $ctx | select Name
108
110
```
109
111
110
-
###Retrieve a reference to a specific table
112
+
## Retrieve a reference to a specific table
111
113
112
114
To perform operations on a table, you need a reference to the specific table. Get a reference using [Get-AzStorageTable](/powershell/module/az.storage/Get-AzStorageTable).
###Reference the CloudTable property of a specific table
120
+
## Reference the CloudTable property of a specific table
119
121
120
122
> [!IMPORTANT]
121
123
> Using the **CloudTable** property is mandatory when working with table data via the **AzTable** PowerShell module. Call the **Get-AzStorageTable** command to get the reference to this object. This command also creates the table if it does not already exist.
To delete a table, use [Remove-AzStorageTable](/powershell/module/az.storage/Remove-AzStorageTable). This cmdlet removes the table, including all of its data.
If you created a new resource group and storage account at the beginning of this how-to, you can remove all of the assets you have created in this exercise by removing the resource group. This command deletes all resources contained within the group as well as the resource group itself.
0 commit comments