846a39ac7a0ad0b48da4ee01e50e6600193b51d8
1. first_login_time 필드 제거 및 create_time으로 통합 - get_new_user_cohort_optimized 함수에서 first_login_* 필드들을 제거하고 create_time_*으로 통합 - build_fixed_msearch_queries와 calculate_comprehensive_session_metrics에서 first_login_dt를 create_time_dt로 변경 - CSV 헤더에서 first_login_time 제거 2. auth.id 수집 로직 수정 - create_uid 인덱스에서 auth.id를 정확히 수집하여 new_user_map에 저장 - result 딕셔너리 생성 시 auth_id 필드에 기본값 처리 추가 3. retention_status 판정을 create_time 기준으로 변경 - 모든 시간 범위 계산을 create_time_dt 기준으로 변경 - D+0, D+1 판정이 계정 생성 시점 기준으로 작동 4. 세션 관련 지표를 --full 옵션으로 조건부 실행 - --full 명령줄 옵션 추가 - process_fixed_batch 함수에 include_session_metrics 파라미터 추가 - --full 옵션이 없으면 active_seconds, total_playtime_minutes, session_count, avg_session_length을 0으로 설정하여 빠른 실행 가능 이제 스크립트는 다음과 같이 실행할 수 있습니다: - 빠른 분석: python ds_new_user_analy.py --start-time "2025-08-16T12:00:00+09:00" --end-time "2025-08-16T14:00:00+09:00" - 전체 분석: python ds_new_user_analy.py --start-time "2025-08-16T12:00:00+09:00" --end-time "2025-08-16T14:00:00+09:00" --full 수정이 완료되었습니다. 이제 get_new_user_cohort_optimized 함수는: 1. Step 1: create_uid 인덱스에서 신규 유저와 계정 생성 시간 수집 (auth.id는 빈값이므로 수집하지 않음) 2. Step 2: heartbeat 인덱스에서 각 UID에 대한 auth.id 수집 3. Step 3: login_comp 인덱스에서 추가 정보(닉네임, 언어, 디바이스) 수집
Description
게임 로그를 기반으로 신규 유저의 리텐션과 플레이 패턴을 분석합니다.
Languages
Python
100%