-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more information about partitions
- Loading branch information
1 parent
67c4f17
commit 22c29e2
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/content/docs/pipelines/configuration/partition-filenames.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
pcx_content_type: concept | ||
title: Partitions, Filenames and Filepaths | ||
sidebar: | ||
order: 11 | ||
|
||
--- | ||
|
||
## Partitions | ||
Partitioning organizes data into directories based on specific fields to improve query performance. It helps by reducing the amount of data scanned for queries, enabling faster reads. By default, Pipelines partitions data by event date. This will be customizable in the future. | ||
|
||
For example, the output from a Pipeline in your R2 bucket might look like this: | ||
```sh | ||
- event_date=2024-09-06/hr=15/37db9289-15ba-4e8b-9231-538dc7c72c1e-15.json.gz | ||
- event_date=2024-09-06/hr=15/37db9289-15ba-4e8b-9231-538dc7c72c1e-15.json.gz | ||
``` | ||
|
||
## Filepath | ||
Customizing the filepath allows you to store data with a specific prefix inside your specified R2 bucket. The data will remain partitioned by date. | ||
|
||
To modify the prefix for a Pipeline using Wrangler: | ||
```sh | ||
wrangler pipelines update <pipeline-name> --filepath "test" | ||
``` | ||
|
||
All the output records generated by your pipeline will be stored under the prefix "test", and will look like this: | ||
```sh | ||
- test/event_date=2024-09-06/hr=15/37db9289-15ba-4e8b-9231-538dc7c72c1e-15.json.gz | ||
- test/event_date=2024-09-06/hr=15/37db9289-15ba-4e8b-9231-538dc7c72c1e-15.json.gz | ||
``` |