Repository navigation
직전 거래액이 0원인 단지를 변동 단지에서 제외 - #14
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
배경
market_price_movers갱신 SQL은 단지별 최근 거래와 직전 거래를 비교해 변동률을(최근 - 직전) * 100 / 직전으로 계산합니다. 거래액이 0원인 행을 막는 제약이 없어서, 직전 거래액이 0원인 단지가 하나만 있어도 0 나누기 오류가 나고 갱신 전체가 실패합니다.변경
airflow/dags/rtms/db.py: 분모를NULLIF(previous_deal_amount, 0)으로 바꿨습니다. 해당 단지는change_rate가 NULL이 되어 급등(> 0)·급락(< 0) 조건에 걸리지 않고 결과에서만 빠집니다.airflow/tests/test_rtms_daily_db.py: 직전 거래액이 0원인zero_previous케이스를test_price_movers_exclude_ineligible_groups에 추가했습니다.확인
uv run ruff format --check .,uv run ruff check .,airflow/에서uv run pyright통과airflow/에서uv run pytest tests/test_rtms_daily_db.py28개 통과 (임시 Postgres 18 컨테이너 사용)🤖 Generated with Claude Code
Summary by CodeRabbit