Skip to content

Commit ffc2ac7

Browse files
authored
Fix job update SQL to correctly use simple_name for job updates (#2457)
Signed-off-by: Michael Collado <collado.mike@gmail.com>
1 parent db47b40 commit ffc2ac7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

api/src/main/resources/marquez/db/migration/R__1_Jobs_view_and_rewrite_function.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ BEGIN
6262
DO UPDATE SET updated_at = now(),
6363
parent_job_uuid = COALESCE(jobs.parent_job_uuid, EXCLUDED.parent_job_uuid),
6464
simple_name = CASE
65-
WHEN EXCLUDED.parent_job_uuid IS NOT NULL THEN EXCLUDED.name
65+
WHEN EXCLUDED.parent_job_uuid IS NOT NULL THEN EXCLUDED.simple_name
6666
ELSE jobs.name
6767
END,
6868
type = EXCLUDED.type,

api/src/test/java/marquez/OpenLineageIntegrationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,8 @@ public void testOpenLineageJobHierarchyAirflowAddParentForExistingJob()
545545
assertThat(job)
546546
.isNotNull()
547547
.hasFieldOrPropertyWithValue("id", new JobId(NAMESPACE_NAME, dagName + "." + task1Name))
548-
.hasFieldOrPropertyWithValue("parentJobName", dagName);
548+
.hasFieldOrPropertyWithValue("parentJobName", dagName)
549+
.hasFieldOrPropertyWithValue("simpleName", task1Name);
549550

550551
Job parentJob = client.getJob(NAMESPACE_NAME, dagName);
551552
assertThat(parentJob)

0 commit comments

Comments
 (0)