나는이 예제를 구현하기 위해 노력하고있어 :가져 오는 방법 데이터를 빠르게
https://github.com/Azure/azure-documentdb-python/blob/master/samples/DatabaseManagement/Program.py
는 푸른 documentdb에서 데이터를 가져오고 일부 시각화 작업을 수행하려면. 그러나 대신 여기에 #error라고 쓰여있는 줄에 쿼리를 사용하고 싶습니다.
def read_database(client, id):
print('3. Read a database by id')
try:
db = next((data for data in client.ReadDatabases() if data['id'] == database_id))
coll = next((coll for coll in client.ReadCollections(db['_self']) if coll['id'] == database_collection))
return list(itertools.islice(client.ReadDocuments(coll['_self']), 0, 100, 1))
except errors.DocumentDBError as e:
if e.status_code == 404:
print('A Database with id \'{0}\' does not exist'.format(id))
else:
raise errors.HTTPFailure(e.status_code)
내가 10k를 초과하는 항목을 가져 오려면 가져 오기가 정말 느립니다. 어떻게 개선 할 수 있습니까?
감사합니다.
쿼리를 실행할 때 오류가 있습니까? 그렇다면 질문을 편집하고 오류 정보를 포함하십시오. 또한 귀하의 컬렉션이 분할되어 있는지 알려주십시오. –
안녕하세요, 지금 진행 중이십니까? –