Skip to content

Conversation

@Shubhamjay11
Copy link
Member

@Shubhamjay11 Shubhamjay11 commented Dec 17, 2025

This script updates the database by:

  • Making sure student emails are unique
  • Adding inserted_at and updated_at columns to 4 tables
  • Setting timestamps automatically for new records
  • Automatically updating updated_at when a record changes
  • Keeping existing data unchanged

Linked Issue:
Closes #51

Comment on lines +22 to +34
{
"schema_table": "old.assignment_monitoring_data",
"submitted_at": '"submitted_at"',
"backup_file": "deleted_old_after_2025-01-03.csv",
},
{
"schema_table": '"raw".student_assignment',
"submitted_at": "submitted_at",
"backup_file": "deleted_raw_after_2025-01-03.csv",
},
{
"schema_table": "intermediate.final_assignment",
"submitted_at": "submitted_at",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we targeting three tables. If we clean in the base (old schema) it should upsert in the raw and intermediate or is that not the case

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.

Timestamp columns populate in existing table with creating email constraint

3 participants