azure-tablequery

Max $filter comparisons in an Azure Table Query

自古美人都是妖i 提交于 2020-01-04 02:16:09
问题 This page (https://docs.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities) says: Note that no more than 15 discrete comparisons are permitted within a $filter string. However in my experiments I have hit that limit and not had any side effects. For example, this is from Azure Storage Explorer: Statistics for storageacct/table ("PartitionKey eq '1' or PartitionKey eq '2' or PartitionKey eq '3' or PartitionKey eq '4' or PartitionKey eq '5' or PartitionKey eq '6' or

query rowkey with greater than in azure table storage

若如初见. 提交于 2019-12-24 13:03:15
问题 I used this link and the quoted white paper to allow me to sort data inserted into table storage. The 'entities' stored have this simplified 'schema': public class Bla : TableEntity { public Bla(){} public Bla(string partitionKey) { PartitionKey = partitionKey; // rowkey + partition = guid/pk // used to order blas RowKey = (DateTime.UtcNow.Ticks - DateTime.MinValue.Ticks).ToString(); } } I can easily get a 'page' (maximum page size 1000) sorted by the rowkey ascendingly like so: var query =

Table Storage SDK

一世执手 提交于 2019-12-24 07:16:52
问题 I am trying to load some data from a CSV file to Azure table storage row by row using Python. String columns are getting inserted directly but the date column mentioned in the source in the format 2018-02-18T11:29:12.000Z is still loaded as string. This means I am unable to query the records using date column. Can someone tell me if there is a way to create an entity definition (datatype for columns) for the table and use it to load the records in order to avoid dates loaded with string type?

Can PartitionKey be queried with StartsWith?

那年仲夏 提交于 2019-12-21 04:07:02
问题 In Azure Table Storage, is it possible to query PartitionKey with a StartsWith or some other operator e.g. Contains, etc. I know I can do this with RowKeys but is it possible to do it with PartitionKeys? A follow up question is: even if it's doable, is it advisable? Should PartitionKey always be an exact match -- say, for performance reasons? 回答1: Well, the good news is that you CAN do partial matches, and you will get "good" performance as long as the number of partitions being hit is small.

Getting an error message “Error occurred while decoding OAEP padding” while trying to retrieve the entities from Azure Table Storage

送分小仙女□ 提交于 2019-12-11 01:47:30
问题 I am encrypting the table in the following way. public TableRequestOptions EncryptTableStorage() { // Create the IKey used for encryption. var key = new RsaKey("mykey"); var policy = new TableEncryptionPolicy(key, null); TableRequestOptions options = new TableRequestOptions() { EncryptionPolicy = policy }; return options; } My Encrypted entity [EncryptProperty] public string ConsumerId { get; set; } While retrieving, I am using the following code var query = new TableQuery<CloudModelDetail>()

Create a TableEntity with Array or List property?

半腔热情 提交于 2019-12-08 19:38:04
问题 I have stored in an Azure Table some enumerations like this pk rk | en fr de ... foo 1 | 'Eune' 'Fune' 'Dune' ... foo 2 | 'Edoe' 'Fdoe' 'Ddoe' ... bar 1 | 'Unee' 'Unef' 'Trid' ... bar 2 | 'Diee' 'Dief' 'Died' ... bar 3 | 'Trie' 'Tref' 'Trid' ... en , fr , de etc... are the language codes, and respectively the column names in the table. What kind of TableEntity should I create in order to load it properly public class FooEntity : TableEntity { public Dictionary<string, string> Descriptions

Can PartitionKey be queried with StartsWith?

青春壹個敷衍的年華 提交于 2019-12-04 03:28:21
In Azure Table Storage, is it possible to query PartitionKey with a StartsWith or some other operator e.g. Contains, etc. I know I can do this with RowKeys but is it possible to do it with PartitionKeys? A follow up question is: even if it's doable, is it advisable? Should PartitionKey always be an exact match -- say, for performance reasons? Pedro G. Dias Well, the good news is that you CAN do partial matches, and you will get "good" performance as long as the number of partitions being hit is small. If you have lots of partition keys, performance will suffer. I could try to summarize an

How to get all rows in Azure table Storage in C#?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 04:24:24
问题 I am trying to get a list of all entities inside an azure table. Any idea of how I would write this query? 回答1: To answer your question, you could do something like the following: var acc = new CloudStorageAccount( new StorageCredentials("account name", "account key"), true); var tableClient = acc.CreateCloudTableClient(); var table = tableClient.GetTableReference("table name"); var entities = table.ExecuteQuery(new TableQuery<MyEntity>()).ToList(); However please keep in mind that table