Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional logging to read_from_parquet #11

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pipedata"
version = "0.2.1"
version = "0.2.2"
description = "Framework for building pipelines for data processing"
authors = ["Simon Wicks <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion src/pipedata/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.1"
__version__ = "0.2.2"

__all__ = [
"__version__",
Expand Down
7 changes: 6 additions & 1 deletion src/pipedata/ops/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ def parquet_batch_reader(
for file_ref in file_refs:
logger.info(f"Reading parquet file {file_ref}")
ds = pa_dataset.dataset(file_ref, format="parquet")
for batch in ds.to_batches(columns=columns, batch_size=batch_size):
for i, batch in enumerate(
ds.to_batches(columns=columns, batch_size=batch_size)
):
logger.info(
f"Processing batch {i} (length {len(batch)}) from {file_ref}"
)
if return_as == "recordbatch":
yield batch
elif return_as == "record":
Expand Down