- Done:
- Ran
src/streaming/job.py --source kafkaagainst a local Kafka 4.4 broker, fed by Sanchi’ssrc/producers/replay_master.py. All 27,654clean/master.parquetmessages went to topiccalendar-effects-master(created withscripts/create_topics.py). - The job read 110 messages per micro-batch (
--max-per-trigger 110, 10 trading days), so the 10 years took 2 min 14 s, and it printed each event’s CAR as its window closed. - No code changed. This is the Kafka path the file replay could not test: the connector download, JSON parsing with
FAILFAST, and the watermark on Kafka data. - Merged Anushiya’s 5 commits (spike rule,
run_everything.sh, README, tickers) with the config-driven pipeline (decision 0005):masterkeeps hercountryandretailer_typecolumns.etl/join_master.pynow copies them fromconfig/retailers.csv, and the market index getsMARKET_COUNTRY/MARKET_RETAILER_TYPEfromcommon.study.lookup/tickers.csv,etl/tickers_build.pyandclean/tickers.parquetwere removed as copies, andrun_everything.shno longer calls the build script.- After the merge, 84 tests pass and
./run_everything.sh --skip-etlPASSED.
- Ran
- Results:
scripts/check_streaming.py: 25,050 daily rows and all 600 event CARs match the direct computation (largest difference 1.1e-16, the same as the file replay).- The watermark dropped 0 rows. The 90 rows “only in batch” are the last trading days the watermark holds back, as
docs/data-contracts.mddescribes.
- Decisions: none.
- Contracts:
mastergainscountryandretailer_type(string), indocs/data-contracts.mdandsrc/common/contracts.py. Kafka messages carry them too; the streaming job ignores them. - Next:
- The same run on the course cluster: done on 2026-11-18. The command first written here failed (the connector must go on
spark-submit --packages); use the one indocs/handoffs/2026-11-18-mahad-cluster-kafka.md. - Streaming vs batch comparison, once Areej’s answer key and its contract are in.
- Pick the alerts for the demo video.
- The same run on the course cluster: done on 2026-11-18. The command first written here failed (the connector must go on
- Blocked on / needs from others:
- Areej: the batch CAR output and its contract in
docs/data-contracts.md, keyed byticker,event_type,event_date(decision 0004). The comparison waits on it. - Sanchi: the late-data test can now run on a laptop with the recipe below. Add
--late-fraction 0.02to the replay command, then run the check. - Anushiya: please review the tickers merge, described under Consequences in decision 0005. Shopify’s country is
CAinconfig/retailers.csv(Canadain your old list).
- Areej: the batch CAR output and its contract in
- Local Kafka recipe (Mac):
- Install and format once:
- Start the broker and leave it running:
- In another terminal, run
source .venv/bin/activateandexport JAVA_HOME=/opt/homebrew/opt/openjdk@21, then: - Activate
.venvfirst. If your shell setsPYSPARK_PYTHON=python3, Spark’s workers use whicheverpython3comes first on PATH. Without the venv that Python has no pyarrow, and the job fails withModuleNotFoundError: No module named 'pyarrow'.
- Install and format once:
Handoffs, newest first