Skip to content
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

[HUBBLE 444] Refactor Elementary monitoring to run every 30 min #413

Merged
merged 7 commits into from
Jul 1, 2024

Conversation

edualvess
Copy link
Contributor

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with the jira ticket associated with the PR.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated the README with the added features, breaking changes, new instructions on how to use the repository.

What

The elementary_slack_alert_dbt_sdf_marts task was moved into a separate DAG that executes independently of the dbt models after some data quality tests, as defined in Alerting for dbt . This way, we will detect and trigger alerts on problems in a timely manner. The DAG is scheduled to run every 30 minutes, which aligns with the dbt_enriched_base_tables DAG.
The dbt tests running in the new DAG use a new tag designed to fit all the unit tests related to the models' data quality.

Why

Elementary monitoring and alerting are currently executed at the very end of the dbt DAGs. If an upstream dbt model fails, this means that elementary never alerts to a data quality issue because the alerting depends on DAG execution status. The result is that alerts are late arriving or arrive after an issue has already been resolved.

Known limitations

NA

@edualvess edualvess requested a review from a team as a code owner June 27, 2024 16:39
enriched_history_operations_task = dbt_task(dag, tag="enriched_history_operations")
enriched_history_operations_task = dbt_task(
dag, tag="enriched_history_operations", excluded="singular_test"
)
current_state_task = dbt_task(dag, tag="current_state")
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this also need excluded="singular_test"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's no need. I checked with the analytics team and this excluded tag for the singular test is related only to EHO, and the exclusion is mainly to avoid testing the same thing in two different workflows in a similar cadence.

@@ -55,8 +54,6 @@
snapshot_state = dbt_task(dag, tag="snapshot_state")
relevant_asset_trades = dbt_task(dag, tag="relevant_asset_trades")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question for the dbt_tasks in here
Do they need excluded="singular_test" as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same response to the first comment, there's no need.

@edualvess edualvess merged commit 9bf2902 into master Jul 1, 2024
4 checks passed
@edualvess edualvess deleted the refactor/dbt_elementary_alerts branch July 1, 2024 12:24
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