10000 feat: asset checks for web analytics pre-aggregated data by lricoy · Pull Request #33572 · PostHog/posthog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: asset checks for web analytics pre-aggregated data #33572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 13, 2025

Conversation

lricoy
Copy link
Member
@lricoy lricoy commented Jun 11, 2025

Problem

The web analytics pre-aggregated data pipeline lacked data quality checks, making it difficult to detect data integrity issues, as it was relying on running ad-hoc queries all the time.

Changes

  • Table existence checks: Validates all pre-aggregated tables and views exist
  • Data presence validation: Ensures tables contain data (not empty structures)
  • Export file verification: Uses chdb to validate S3/Minio export files are queryable
  • Accuracy validation: Compares pre-aggregated vs regular WebOverview queries within configurable tolerance

Testing

  • Run the Dagster locally and it will work :)

@dmarticus dmarticus moved this to Todo in Feature Flags Jun 12, 2025
@lricoy lricoy marked this pull request as ready for review June 12, 2025 22:34
@lricoy
Copy link
Member Author
lricoy commented Jun 12, 2025

Still not ready, but curious about CI on this one

Copy link
Contributor
@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Added comprehensive data quality checks for web analytics pre-aggregated assets in the Dagster pipeline, implementing automated validation and monitoring systems.

  • Introduced web_preaggregated_asset_checks.py with configurable accuracy checks and weekly scheduled jobs for monitoring data quality
  • Added check_tables_exist utility in web_preaggregated_ddl.py to verify table/view existence and queryability in ClickHouse
  • Implemented daily and hourly table existence checks with detailed error handling and metadata reporting
  • Added metric accuracy comparison between pre-aggregated and regular queries with configurable tolerance levels

3 files reviewed, 4 comments
Edit PR Review Bot Settings | Greptile

@haacked haacked removed this from Feature Flags Jun 13, 2025
@lricoy lricoy force-pushed the chore/data-checks branch from 380a854 to a7ec7a6 Compare June 13, 2025 19:45
@lricoy lricoy changed the title feat: data checks for web analytics pre-aggregated assets feat: asset checks for web analytics pre-aggregated data Jun 13, 2025
@lricoy lricoy requested review from a team, robbie-c, jabahamondes and rafaeelaudibert and removed request for a team June 13, 2025 19:56
@lricoy lricoy merged commit 331a411 into master Jun 13, 2025
107 checks passed
@lricoy lricoy deleted the chore/data-checks branch June 13, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0