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-177]Convert teammember_latest to dynamic table #149

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

danlu1
Copy link
Contributor

@danlu1 danlu1 commented Feb 19, 2025

Problem:

Currently, the teammember_latest table is a table that is updated via upserting task that are based on teammembersnapshots stream. We want to convert it to dynamic table so it gets refreshed automatically.

Solution:
Following the instructions of this SOP:

  • Add a script to create a backup of the original teammember_latest table which need to be removed manually after validation
  • Add a script to delete the upserting task for the original teammember_latest table
  • Add a script to delete stream for teammembersnapshots table that is referred in teammember_latest upserting task
  • Add a script to drop the original teammember_latest table so we can create a dynamic table with the same name
  • Create teammember_latest dynamic table and add table and column comments at the same time according to the newest SOP.

@danlu1 danlu1 requested a review from a team as a code owner February 19, 2025 18:33
Copy link
Collaborator

@philerooski philerooski left a comment

Choose a reason for hiding this comment

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

Wait for others review before merging, but this looks good to me.

It also just occurred to me that we should probably be doing these dynamic table conversions in two PRs:

  1. Creation of the dynamic table
  2. (Validation)
  3. Deletion of old table and related objects

This allows us to compare the upsert behavior of the dynamic table to that of the original table. That's something we don't get with a static backup of the original table.

Specific columns in CTE and remove extra tab
Copy link

@danlu1 danlu1 merged commit b0b4d8b into dev Feb 20, 2025
3 checks passed
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.

3 participants