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

Add min sequence number and creation date #61

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

sydneynotthecity
Copy link
Contributor

@sydneynotthecity sydneynotthecity commented Jul 9, 2024

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 docs and README with the added features, breaking changes, new instructions on how to use the repository.

Release planning

  • I've decided if this PR requires a new major/minor/patch version accordingly to
    semver, and I've changed the name of the BRANCH to release/* , feature/* or patch/* .

What

This PR removes self-referential logic between accounts and accounts_current in a downstream dbt model. by adding min sequence number and account creation date to the original staging table, we remove anti-patterns in downstream dbt models.

Why

To get all CI checks to pass (project evaluator and elementary) we needed to remove the account_date CTE in this MGI model

Known limitations

[TODO or N/A]

@sydneynotthecity sydneynotthecity requested a review from a team as a code owner July 9, 2024 19:07
@sydneynotthecity
Copy link
Contributor Author

Identical PR: #39. Closed because the CI was failing due to transient errors

@@ -60,9 +60,31 @@ with
{% endif %}
)

, account_date as (
Copy link
Contributor

@chowbao chowbao Jul 9, 2024

Choose a reason for hiding this comment

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

nit: accounts is pretty small so this probably doesn't matter much but I'm pretty sure we could create an int_* for account create time instead of running this CTE. It's probably also possible to only look up relevant account_ids in incremental runs instead of all account_ids

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I agree. I created a ticket to research/refactor: https://stellarorg.atlassian.net/browse/HUBBLE-498

@sydneynotthecity sydneynotthecity merged commit a4d2735 into master Jul 9, 2024
2 checks passed
@sydneynotthecity sydneynotthecity deleted the feature/add-new-account-fields branch November 14, 2024 14:33
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