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

Update vignette section on scanning partitions #458

Merged
merged 2 commits into from
Nov 2, 2023
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
10 changes: 3 additions & 7 deletions vignettes/polars.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,8 @@ aq$filter(
)$collect()
```

Finally, can read/scan multiple files in the same directory through pattern
globbing. However, please note that partition-aware scanning is not yet
supported out of the box (e.g., Hive-style partitioned datasets). Follow
[this issue](https://github.com/pola-rs/polars/issues/4347) for more details
about when this will be resolved.
Finally, we can read/scan multiple files in the same directory through pattern
globbing.

```{r}
dir.create("airquality-ds")
Expand All @@ -480,8 +477,7 @@ write_dataset(airquality, "airquality-ds", partitioning = "Month")
# Use pattern globbing to scan all parquet files in the folder
aq2 = pl$scan_parquet("airquality-ds/*/*.parquet")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
aq2 = pl$scan_parquet("airquality-ds/*/*.parquet")
aq2 = pl$scan_parquet("airquality-ds/**/*.parquet")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah too late 😄


# Just print the first two rows. But note that the Month column
# (which we used for partitioning) is missing.
# Just print the first two rows.
aq2$limit(2)$collect()
```

Expand Down
Loading