i have seen azure table storage supports querying records partial rowkey
(in addition partitionkey
) (c# example here).
however, can't find related in actual docs on filtering query results (here).
i trying using python azure-storage sdk query subset of partitionkey
, rowkey
combinations rowkey
starts string. have code (which works, not correct filtering row keys):
from azure.storage.table import tableservice table_service = tableservice(account_name=account_name, account_key=account_key) entities = table_service.query_entities('mystoragetable', filter='partitionkey eq mypartitionkey"', num_results=10)
however, can't figure out syntax adding partial (startswith
) constraint filter.
has had experience filtering azure table storage queries partial rowkey
strings? @ loss here; however, seems possible via c#
code in example above.
if there docs how via rest call, can translate python usage.
assuming rowkey values contains words , want filter words starting a
, b
, add query:
(rowkey ge 'a' , rowkey lt 'c') ==> (rowkey >= 'a' && rowkey < 'c')
so code like:
entities = table_service.query_entities('mystoragetable', filter="partitionkey eq 'mypartitionkey' , rowkey ge '<starts substring>'", num_results=10)
Comments
Post a Comment