Мой запрос должен возвращать более 1000 строк. Но query_entities возвращают только 1000 строк для одного запроса.
Итак, я хочу использовать токен, перезапущенный, когда результат запроса превышает 1000 строк, чтобы получить все строки, которые должны быть возвращены запросом. Но я не могу получить атрибут продолжения x-ms.
#coding:utf-8
class Use_Azure_Data:
def __init__(self, account_name, sas_token):
self._account_name = account_name
self._sas_token = sas_token
#Auth
def _set_table_service(self):
table_service = TableService(account_name=self._account_name, sas_token=self._sas_token)
return(table_service)
def Retrives_datas(self, days_before):
before_now = datetime.datetime.now() - datetime.timedelta(days=days_before)
now = before_now.isoformat()
filter = "Timestamp gt datetime'" + now + "'"
Query = self.Table_Service.query_entities('MyTable', filter = filter, timeout=None)
if hasattr(Query, 'x-ms-continuation'):
print("x-ms-continuation attribut for Query EXIST.")
else:
print("x-ms-continuation attribut for Query NOT EXIST.
Table_Service = property(_set_table_service)
Data = Use_Azure_Data('MyAccount', 'MySASkey' )
Data.Retrives_datas(7)
Атрибут x-ms-продолжение для Query EXIST.
Я хочу получить x-ms-продолжение, чтобы использовать его для получения всех строк, по моему запросу