Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions data/src/ingestion/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,30 +78,6 @@ def land_raw_json(
return len(records)


def read_raw_json(
account: str,
path: str,
container: str,
) -> list[dict]:
"""Read an NDJSON blob back from Azure."""

credential = DefaultAzureCredential()

service = BlobServiceClient(
f"https://{account}.blob.core.windows.net",
credential,
)

blob_client = service.get_blob_client(
container=container,
blob=path,
)

payload = blob_client.download_blob().readall().decode("utf-8")

return [json.loads(line) for line in payload.splitlines() if line.strip()]


def land_local_json(directory: Path, path: str, records: list[dict]) -> int:
"""Write the same file to this machine instead of to the landing zone.

Expand Down
Loading