Pattern: Cloud folder to project
Browse an approved prefix, import it into a project, and monitor the created Batch Queue.
storage = client.cloud_storages.get("CLOUD_STORAGE_ID")
entries = list(storage.browse(prefix="incoming/study-001/"))
if not entries:
raise RuntimeError("Cloud prefix is empty")
batch = project.import_cloud(storage, ["incoming/study-001/"])
status = batch.wait(timeout=1800)
if status.failed:
for row in project.batch_queue(batch.batch_queue_id).data():
print(row)Operating contract
Concern
Required behavior
Failure and recovery boundary
Condition
Response