Commit Graph

7 Commits

Author SHA1 Message Date
846a39ac7a 수정 완료 사항
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 인덱스에서 추가 정보(닉네임, 언어, 디바이스) 수집
2025-08-29 12:36:33 +09:00
37ed0cfa19 Fix CSV file name in logging output for new user analysis script 2025-08-29 11:41:29 +09:00
ff1878cc90 Enhance new user cohort selection by utilizing create_uid index and improving logging details 2025-08-28 21:54:25 +09:00
829d504936 결과물 파일명 변경 2025-08-27 17:21:05 +09:00
f859a31e7d Refactor metrics configuration and improve query efficiency by updating field references and aggregation types 2025-08-27 04:45:07 +09:00
2a7a481e55 Implement code changes to enhance functionality and improve performance 2025-08-27 02:15:45 +09:00
2cc58c18c4 분석 스크립트 초안 작성 2025-08-27 01:10:50 +09:00