feat: add production GA4 Silver validation model#22
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds production GA4 environment configuration and source metadata, plus a new incremental ChangesGA4 silver events pipeline
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GA4 as GA4 daily tables
participant dbt as silver_events_temp
participant BigQuery as BigQuery target
GA4->>dbt: Read filtered daily events
dbt->>dbt: Canonicalize and deduplicate identities
dbt->>dbt: Normalize parameters and sessionize Android signup events
dbt->>BigQuery: Insert-overwrite event_dt partitions
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)dbt/models/silver/_ga4__sources.ymlTraceback (most recent call last): dbt/models/silver/_silver_events_temp.ymlTraceback (most recent call last): Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
변경 사항
event_params를 key와 typed value 기준으로 정렬한 canonical raw payload로raw_event_id를 생성합니다.raw_delivery_id로 보존합니다.canonical_event_params를 사용해 배열 순서에 따른 비결정성을 제거합니다.event_id정의는 유지합니다.custom_session_id는 그대로 사용하고, NULL인 Android 가입 이벤트에만 만드는sign_up_strict_*보정값의 생성식을 기존 Dataform과 일치시켰습니다.start_date/end_date변수로 기간별 백필과 파티션 교체가 가능하도록 했습니다.배경
event_params배열 순서만 다른 행이 있어, 정렬 전 payload 해시가 거짓 충돌을 만들었습니다.운영 영향
silver_events를 즉시 교체하지 않고silver_events_temp로 생성·검증합니다.* text=auto eol=lf줄바꿈 규칙을 유지합니다.custom_session_id값은 변경하지 않습니다.검증
dbt parse통과dbt compile통과kap-chat.analytics_432041405.events_*로 컴파일되는 것을 확인raw_event_id/event_idNULL·중복과 필수 컬럼 오류 모두 0git diff --check통과남은 검증
최신 커밋은 원본 로그가 아니라 NULL 가입 세션 보정 ID 생성식만 변경합니다. 전체 24.852GB를 반복 실행하지 않고, 보정 ID가 존재했던 2025-07-01~2026-01-15 구간만 기준 뷰와 재비교하면 됩니다.
Summary by CodeRabbit
New Features
Configuration
Documentation