์‹œ๋‹ˆ์–ด
2026๋…„ 8์›” 19์ผ

๋ฒ„๊ทธ๋ฅผ ์ฐพ์•„๋ผ: Data Engineering

์ฝ”๋“œ ํ•œ ์กฐ๊ฐ. ๋ฒ„๊ทธ๋ฅผ ์ฐพ๊ฑฐ๋‚˜, ๋ฒ„๊ทธ๊ฐ€ ์—†์Œ์„ ์ฆ๋ช…ํ•˜์„ธ์š”.

python
1from typing import Callable
2
3class PipelineEventBus:
4    def __init__(self):
5        self._subscribers: list[Callable] = []
6
7    def subscribe(self, callback: Callable):
8        self._subscribers.append(callback)
9
10    def publish(self, event: dict):
11        for sub in self._subscribers:
12            sub(event)
13
14bus = PipelineEventBus()
15bus.subscribe(lambda e: metrics.record(e))
16bus.subscribe(lambda e: alerting.notify(e))
17bus.subscribe(lambda e: audit_log.write(e))
18
19def on_batch_complete(batch_id: str):
20    bus.publish({"type": "batch_complete", "batch_id": batch_id})

๋ฌธ์ œ๊ฐ€ ๋˜๋Š” ์ค„์„ ํด๋ฆญํ•˜์„ธ์š”.

๋‹น์‹ ์˜ ํŒ๋‹จ

ํ•˜๋ฃจ ํ•œ ๋ฒˆ. ์ œ์ถœํ•˜๋ฉด ๋ฐ”๋กœ ์ •๋‹ต์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

์—ฐ์† ๊ธฐ๋ก ์œ ์ง€ํ•˜๊ธฐ

๊ณ„์ •์„ ๋งŒ๋“ค๋ฉด ์—ฐ์† ๊ธฐ๋ก์„ ์œ ์ง€ํ•˜๊ณ  ์ง„ํ–‰ ์ƒํ™ฉ์„ ์ถ”์ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ณ„์ • ๋งŒ๋“ค๊ธฐ