From ce2334a5e22b003e75a4a406eb4b2283d256668d Mon Sep 17 00:00:00 2001 From: ken <3939605+kenyiu@users.noreply.github.com> Date: Tue, 13 Jan 2026 09:15:06 +0000 Subject: [PATCH] fix: update timestamp fields from created_at to committed_at in models and tests --- .../commits/int_opendevdata__commits_with_repo_id.sql | 4 ++-- .../ddp/developers/int_opendevdata__developers.sql | 2 +- .../test_int_opendevdata__commits_with_repo_id.yml | 4 ++-- .../tests/test_int_opendevdata__developers.yml | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/warehouse/oso_sqlmesh/models/intermediate/domain-specific/ddp/commits/int_opendevdata__commits_with_repo_id.sql b/warehouse/oso_sqlmesh/models/intermediate/domain-specific/ddp/commits/int_opendevdata__commits_with_repo_id.sql index 99b2d45575..89e3890cfa 100644 --- a/warehouse/oso_sqlmesh/models/intermediate/domain-specific/ddp/commits/int_opendevdata__commits_with_repo_id.sql +++ b/warehouse/oso_sqlmesh/models/intermediate/domain-specific/ddp/commits/int_opendevdata__commits_with_repo_id.sql @@ -3,7 +3,7 @@ MODEL ( description 'OpenDevData commits enriched with canonical repo_id', dialect trino, kind FULL, - partitioned_by DAY("created_at"), + partitioned_by DAY("committed_at"), tags ( "opendevdata", "ddp", @@ -18,7 +18,7 @@ SELECT odc.id, odc.repo_id AS opendevdata_repo_id, odc.sha1, - odc.created_at, + odc.created_at AS opendevdata_created_at, odc.additions, odc.deletions, odc.authored_at, diff --git a/warehouse/oso_sqlmesh/models/intermediate/domain-specific/ddp/developers/int_opendevdata__developers.sql b/warehouse/oso_sqlmesh/models/intermediate/domain-specific/ddp/developers/int_opendevdata__developers.sql index 150f94f253..d077a12fb0 100644 --- a/warehouse/oso_sqlmesh/models/intermediate/domain-specific/ddp/developers/int_opendevdata__developers.sql +++ b/warehouse/oso_sqlmesh/models/intermediate/domain-specific/ddp/developers/int_opendevdata__developers.sql @@ -25,7 +25,7 @@ WITH developer_history AS ( '@', SPLIT_PART(commits.commit_author_email, '@', 2) ) AS hashed_author_email, - MIN(commits.created_at) AS valid_from + MIN(commits.committed_at) AS valid_from FROM oso.stg_opendevdata__commits AS commits INNER JOIN oso.stg_opendevdata__canonical_developers AS devs ON commits.canonical_developer_id = devs.id diff --git a/warehouse/oso_sqlmesh/tests/test_int_opendevdata__commits_with_repo_id.yml b/warehouse/oso_sqlmesh/tests/test_int_opendevdata__commits_with_repo_id.yml index 9cbb33f6a4..99cb08cbaa 100644 --- a/warehouse/oso_sqlmesh/tests/test_int_opendevdata__commits_with_repo_id.yml +++ b/warehouse/oso_sqlmesh/tests/test_int_opendevdata__commits_with_repo_id.yml @@ -79,7 +79,7 @@ test_int_opendevdata__commits_with_repo_id: - id: 1 opendevdata_repo_id: 10 sha1: "sha1" - created_at: "2024-01-01 00:00:00" + opendevdata_created_at: "2024-01-01 00:00:00" additions: 10 deletions: 5 authored_at: "2024-01-01 00:00:00" @@ -95,7 +95,7 @@ test_int_opendevdata__commits_with_repo_id: - id: 2 opendevdata_repo_id: 10 sha1: "sha2" - created_at: "2024-01-01 00:00:00" + opendevdata_created_at: "2024-01-01 00:00:00" additions: 20 deletions: 10 authored_at: "2024-01-01 00:00:00" diff --git a/warehouse/oso_sqlmesh/tests/test_int_opendevdata__developers.yml b/warehouse/oso_sqlmesh/tests/test_int_opendevdata__developers.yml index 8e801946b2..b10649f661 100644 --- a/warehouse/oso_sqlmesh/tests/test_int_opendevdata__developers.yml +++ b/warehouse/oso_sqlmesh/tests/test_int_opendevdata__developers.yml @@ -6,7 +6,7 @@ test_int_opendevdata__developers_single_entry: - canonical_developer_id: 101 commit_author_name: "Open Dev" commit_author_email: "dev@open.com" - created_at: "2024-01-01 10:00:00" + committed_at: "2024-01-01 10:00:00" oso.stg_opendevdata__canonical_developers: rows: - id: 101 @@ -30,16 +30,16 @@ test_int_opendevdata__developers_scd_logic: - canonical_developer_id: 202 commit_author_name: "Original Name" commit_author_email: "original@test.com" - created_at: "2024-01-01 10:00:00" + committed_at: "2024-01-01 10:00:00" - canonical_developer_id: 202 commit_author_name: "New Name" commit_author_email: "original@test.com" - created_at: "2024-02-01 12:00:00" + committed_at: "2024-02-01 12:00:00" # Duplicate record for first state - canonical_developer_id: 202 commit_author_name: "Original Name" commit_author_email: "original@test.com" - created_at: "2024-01-15 10:00:00" + committed_at: "2024-01-15 10:00:00" oso.stg_opendevdata__canonical_developers: rows: - id: 202 @@ -70,7 +70,7 @@ test_int_opendevdata__developers_filter_nulls: - canonical_developer_id: null commit_author_name: "Ghost" commit_author_email: "ghost@test.com" - created_at: "2024-01-01 10:00:00" + committed_at: "2024-01-01 10:00:00" oso.stg_opendevdata__canonical_developers: rows: [] outputs: