azure-table-storage

Why isn't my TakeLimit honored by TableQuery?

左心房为你撑大大i 提交于 2020-01-01 03:12:08
问题 I'd like to fetch top n rows from my Azure Table with a simple TableQuery. But with the code below, all rows are fetched regardless of my limit with the Take. What am I doing wrong? int entryLimit = 5; var table = GetFromHelperFunc(); TableQuery<MyEntity> query = new TableQuery<MyEntity>() .Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "MyPK")) .Take(entryLimit); List<FeedEntry> entryList = new List<FeedEntry>(); TableQuerySegment<FeedEntry> currentSegment =

insert complex objects to azure table with TableServiceEntity

99封情书 提交于 2019-12-31 21:53:08
问题 I was considering adding a whole complex object into a table. Having come from good old fashioned SQL approach I'd obviously separate this into tables but I'm trying a different approach. So basically I have an object that is made up of a nested class (sort of a thing you get when you deserialise a json collection) that have usual Customer, Business and a list of InvoiceItems. public class Business { public string _id { get; set; } public string name { get; set; } public string street_1 { get

How to execute an Azure table storage query async? client version 4.0.1

让人想犯罪 __ 提交于 2019-12-31 08:32:58
问题 Want to execute queries Async on Azure Storage Client Version 4.0.1 There is NO method ExecuteQueryAsync().. I am missing something? Should we continue to use the ExecuteQuerySegmentedAsync still? Thanks. 回答1: I end up making an extension method to use ExecuteQuerySegmentedAsync. I am not sure whether this solution is optimal, if anybody has any comment please don’t hesitate. public static async Task<IList<T>> ExecuteQueryAsync<T>(this CloudTable table, TableQuery<T> query, CancellationToken

Hide data in an azure table from a specific audience

纵然是瞬间 提交于 2019-12-31 03:38:04
问题 I have a resource group in Azure which contains cloud service and a storage account. I want to give access to the resource group to my developers so that they can access the resources and make changes. However, there is one particular table in the storage account which contains sensitive user details. The table is being updated through our client app using SAS tokens. I want only few selected people from my team to be able to see the complete contents of the table. Is there any way in azure

Error deleting from Azure Cloud Table - ResourceNotFound

梦想的初衷 提交于 2019-12-30 05:16:14
问题 I'm having an intermittent problem deleting objects from an azure table. It only affects about 1% of my attempts, and if the same call is made again later then it works fine, but I'd love to find out the reason behind it! I've googled my fingers off and I've found the lack of documentation out there on how to create very reliable code for deleting, inserting and updating to be quite surprising ... it all seems to be a bit hit and miss, "try it, most of the time it will work" EDIT: I am

Could not load file or assembly Microsoft.Data.OData Version=5.2.0.0 error in Azure Cloud Worker Role using Table Storage

青春壹個敷衍的年華 提交于 2019-12-29 11:46:29
问题 I have a very peculiar issue using Azure Table Storage. I have a .NET 4.5 project in Visual Studio 2012 where I deal with all my Azure Table Storage functions. This project/dll is referenced by two other projects, my MVC website, and my Azure Worker Role. (I am running under the Azure Emulators on my machine, but it also happens when I deploy it to the cloud) I have the following function that is called when I save or retrieve a record: internal static CloudTable GetTable(CloudStorageAccount

Precompiled Azure function and CloudTable binding output doesn't work

血红的双手。 提交于 2019-12-29 06:27:07
问题 I'm using a precompiled Azure Function that looks: public static async Task Run(Stream inputBlob, Stream outputJson, Stream outputXml, CloudTable schedulerTable) The output binding looks: { "name": "schedulerTable", "type": "table", "direction": "out", "tableName": "SchedulerTable", "connection": "SchedulerTable" } When i remove the parameter schedulerTable from my function, it's works. ´The message that the host throws in my face is: Microsoft.Azure.WebJobs.Host: Error indexing method

How to create azure storage table using rest api via powershell

风格不统一 提交于 2019-12-25 08:03:09
问题 I have an idea how to create azure storage tables using PowerShell and portal, can some one guide how to create it using rest api like $jsonbody = @{} $authorization = "" Invoke-restmethod -uri "" 回答1: For a simple way, you could leverage New-AzureStorageTable cmdlet to create your storage table as follows: #Define the storage account and context. $StorageAccountName = "yourstorageaccountname" $StorageAccountKey = "yourstorageaccountkey" $Ctx = New-AzureStorageContext $StorageAccountName

Accessing Azure Tables from within a virtual network

倾然丶 夕夏残阳落幕 提交于 2019-12-25 05:33:42
问题 Is there any way to access an azure table using the API from within a virtual network? The storage account was created pre-virtual network. Currently, the code works fine (a test worker role) that creates a table, but fails when I place it inside a virtual network. It's not possible to report on the exception being thrown as nothing is shown in diagnostics CloudTable table = tableClient.GetTableReference("test"); bool retVal = table.CreateIfNotExists(); Thanks 回答1: I'm not sure how you're

Securing azure table storage connection string

谁说我不能喝 提交于 2019-12-25 03:02:03
问题 How to secure an azure table connection string? It is not safe to store it inside code or in a config file. What is the best practice? Can I use some kind of certificate based authentication? 回答1: You can encrypt the connection strings section of the config file. A certificate can be made using the Visual Studio Command Prompt which will be used as an encryption key. Once you have the cert, you can add it to your solution and encrypt the connection strings section. After that, upload the cert