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

[SNOW-29] Initialize dynamic table: verificationsubmission_latest #83

Merged
merged 8 commits into from
Nov 14, 2024

Conversation

jaymedina
Copy link
Contributor

@jaymedina jaymedina commented Nov 12, 2024

problem

  • The latest table for verificationsubmissionsnapshots does not exist in Snowflake.
  • Following versioning best practices for Schemachange, we should initialize the dynamic table from a separate V script to mark its introduction into the system.

Associated with #81.

solution

Add a V script to initialize verificationsubmission_latest

testing

There are 19 unique submissions stored in the snapshots table, meaning there should be 19 total rows in the deduplicated latest table. The reason being that each submission can only be in 1 state - CREATED or UPDATED:

image

We verify that the V script generates a table with 19 rows:

image

We verify that the 19 unique IDs in the snapshots table matches the 19 unique IDs in the latest table:

image

( This query would produce results if there were any missing IDs from either table )

We use a few IDs to manually verify that the latest state of each submission is reflected in the latest table:

  • 67
image image
  • 65
image image
  • 36
image image

@jaymedina jaymedina marked this pull request as ready for review November 12, 2024 15:53
@jaymedina jaymedina requested a review from a team as a code owner November 12, 2024 15:53
@thomasyu888
Copy link
Member

Awesome to see this! Thanks for your work here!

Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, I'll leave it to @philerooski for a final review so he can get familiar with this

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@jaymedina jaymedina merged commit 6555b15 into dev Nov 14, 2024
2 of 3 checks passed
@jaymedina jaymedina deleted the snow-29-init-verificationsubmission-latest branch November 14, 2024 20: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.

4 participants