From 26641c689176c6dfee1280b51b304c19a7cef4d7 Mon Sep 17 00:00:00 2001 From: Thomas Pfau Date: Tue, 24 Mar 2026 08:07:21 +0200 Subject: [PATCH 1/3] Make JobName the actual Jobname and not the max --- slurm2sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slurm2sql.py b/slurm2sql.py index 942850d..3706b60 100644 --- a/slurm2sql.py +++ b/slurm2sql.py @@ -938,7 +938,7 @@ def infer_type(cd): 'JobIDnostep AS JobID, ' 'max(User) AS User, ' 'max(Partition) AS Partition, ' - 'max(JobName) AS JobName, ' + '(SELECT s2.JobName FROM slurm AS s2 WHERE s2.JobIDnostep = slurm1.JobIDnostep AND s2.JobID = s2.JobIDnostep LIMIT 1) AS JobName,' 'group_concat(SubmitLine, \'\n\') AS SubmitLines, ' 'Account, ' '(SELECT State FROM allocations AS allocations2 WHERE allocations2.jobid=slurm1.JobIDnostep) AS State, ' From 8ba478e1b5a748380615dd07fa4881032cb664b9 Mon Sep 17 00:00:00 2001 From: Thomas Pfau Date: Tue, 24 Mar 2026 08:28:15 +0200 Subject: [PATCH 2/3] Set Timelimit to max (can be None otherwise) --- slurm2sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slurm2sql.py b/slurm2sql.py index 3706b60..2abdf56 100644 --- a/slurm2sql.py +++ b/slurm2sql.py @@ -945,7 +945,7 @@ def infer_type(cd): #'State AS State, ' 'NodeList, ' 'Time, ' - 'TimeLimit, ' + 'max(TimeLimit) AS TimeLimit, ' 'min(Start) AS Start, ' 'max(End) AS End, ' 'max(NNodes) AS NNodes, ' From f8a078d7bc410a390de72dbf99f07f67e873c143 Mon Sep 17 00:00:00 2001 From: Thomas Pfau Date: Tue, 24 Mar 2026 10:11:17 +0200 Subject: [PATCH 3/3] Update slurm2sql.py Co-authored-by: Richard Darst --- slurm2sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slurm2sql.py b/slurm2sql.py index 2abdf56..e1e68a3 100644 --- a/slurm2sql.py +++ b/slurm2sql.py @@ -938,7 +938,7 @@ def infer_type(cd): 'JobIDnostep AS JobID, ' 'max(User) AS User, ' 'max(Partition) AS Partition, ' - '(SELECT s2.JobName FROM slurm AS s2 WHERE s2.JobIDnostep = slurm1.JobIDnostep AND s2.JobID = s2.JobIDnostep LIMIT 1) AS JobName,' + '(SELECT s2.JobName FROM slurm AS s2 WHERE s2.JobIDnostep = slurm1.JobIDnostep AND s2.JobStep IS null LIMIT 1) AS JobName,' 'group_concat(SubmitLine, \'\n\') AS SubmitLines, ' 'Account, ' '(SELECT State FROM allocations AS allocations2 WHERE allocations2.jobid=slurm1.JobIDnostep) AS State, '