Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix: export leaf rows in query_log_archive export (#74748)

Andy Zhaod7da4bfc619e
diff --git a/posthog/dags/export_query_log_archive_to_s3.py b/posthog/dags/export_query_log_archive_to_s3.py
index 5b08a3f10e12..b95d49307fb3 100644
--- a/posthog/dags/export_query_log_archive_to_s3.py
+++ b/posthog/dags/export_query_log_archive_to_s3.py
@@ -138,7 +138,7 @@ SELECT
normalizeQuery(query) AS query_shape,
normalizeQuery(lc_query__query) AS hogql_shape
FROM {SOURCE_TABLE}
-WHERE event_date = toDate('{day}') AND is_initial_query
+WHERE event_date = toDate('{day}')
SETTINGS s3_truncate_on_insert = 1, max_threads = {config.max_threads}
"""