Skip to content

rolling s3 copy script#12

Merged
mneedham merged 1 commit into
mainfrom
s3_ingest
Jul 16, 2026
Merged

rolling s3 copy script#12
mneedham merged 1 commit into
mainfrom
s3_ingest

Conversation

@tom-clickhouse

Copy link
Copy Markdown
Collaborator

No description provided.

@mneedham
mneedham merged commit 099d2d8 into main Jul 16, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an S3 “rolling feed” mechanism for the hits_100B realtime ingest benchmark, letting you continuously copy Parquet files into a destination bucket at a controlled effective ingest rate (rows/sec), plus the accompanying consumer-side ClickHouse table DDL.

Changes:

  • Added rolling_s3_copy.py to pace server-side S3→S3 copies to a target --eps, with optional looping and periodic throughput summaries.
  • Added _s3_ingest/INGEST.md and _call.txt with setup and operational steps for running the feeder and pointing consumers at the destination bucket.
  • Added clickhouse-cloud/create.sql defining the hits table schema for ClickHouse Cloud.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
full-path-realtime/hits/clickhouse-cloud/create.sql Adds ClickHouse table DDL for ingesting the hits_100B feed.
full-path-realtime/hits/_s3_ingest/rolling_s3_copy.py Adds the rolling, rate-controlled S3 copy feeder script.
full-path-realtime/hits/_s3_ingest/INGEST.md Documents prerequisites and how to run the feeder and configure consumers.
full-path-realtime/hits/_s3_ingest/_call.txt Adds a quick command checklist for manual runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +55 to +57
import boto3
from boto3.s3.transfer import TransferConfig

Comment on lines +112 to +116
if args.eps <= 0:
sys.exit("--eps must be positive")

interval = args.rows_per_file / args.eps
total_files = args.num_files - args.start_index
Comment on lines +172 to +178
t0 = time.time()
s3.copy(
{"Bucket": args.source_bucket, "Key": src_key},
args.dest_bucket,
dest_key,
Config=transfer_config,
)
s3://public-pme/hits_100B/2000x50m_span_27h46m40s_rps_1m/hits_p00000.parquet \
s3://public-pme/hits_100B_feed/hits_p00000.parquet

- (3) Create the pipeline - initial load ingests the real 50M rows from file 0
- wait until that happened...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants