Skip to content

Commit

Permalink
Show last select query instead of first
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Jun 20, 2024
1 parent bff59dc commit bbb84a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/management/commands/backfill_raw_sessions_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def select_query(select_date: Optional[datetime] = None, team_id=None) -> str:
count_query = f"SELECT count(), uniq(session_id_v7) FROM ({select_query()})"
[(events_count, sessions_count)] = sync_execute(count_query, settings=SETTINGS)
logger.info(f"{events_count} events and {sessions_count} sessions to backfill for")
logger.info(f"The first select query would be:\n{select_query(self.start_date)}")
logger.info(f"The first select query to run would be:\n{select_query(self.end_date)}")
return

for i in reversed(range(num_days)):
Expand Down

0 comments on commit bbb84a9

Please sign in to comment.