Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
404e8a07
Commit
404e8a07
authored
Jul 01, 2011
by
Leo Gordon
Browse files
show count to be 0 for analyses which have no jobs
parent
f7523be1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
sql/procedures.sql
sql/procedures.sql
+5
-1
sql/procedures.sqlite
sql/procedures.sqlite
+5
-1
No files found.
sql/procedures.sql
View file @
404e8a07
...
...
@@ -14,7 +14,11 @@
#
select
*
from
progress
where
retry_count
>
1
;
#
only
show
jobs
that
have
been
tried
more
than
once
CREATE
OR
REPLACE
VIEW
progress
AS
SELECT
CONCAT
(
a
.
logic_name
,
'('
,
a
.
analysis_id
,
')'
)
analysis_name_and_id
,
j
.
status
,
j
.
retry_count
,
count
(
*
)
cnt
,
job_id
example_job_id
SELECT
CONCAT
(
a
.
logic_name
,
'('
,
a
.
analysis_id
,
')'
)
analysis_name_and_id
,
j
.
status
,
j
.
retry_count
,
CASE
WHEN
j
.
status
IS
NULL
THEN
0
ELSE
count
(
*
)
END
cnt
,
job_id
example_job_id
FROM
analysis
a
LEFT
JOIN
job
j
USING
(
analysis_id
)
GROUP
BY
a
.
analysis_id
,
j
.
status
,
j
.
retry_count
ORDER
BY
a
.
analysis_id
,
j
.
status
;
...
...
sql/procedures.sqlite
View file @
404e8a07
...
...
@@ -14,7 +14,11 @@
-- select * from progress where retry_count>1; # only show jobs that have been tried more than once
CREATE VIEW IF NOT EXISTS progress AS
SELECT a.logic_name || '(' || a.analysis_id || ')' analysis_name_and_id, j.status, j.retry_count, count(*) cnt, job_id example_job_id
SELECT a.logic_name || '(' || a.analysis_id || ')' analysis_name_and_id,
j.status,
j.retry_count,
CASE WHEN j.status IS NULL THEN 0 ELSE count(*) END cnt,
job_id example_job_id
FROM analysis a LEFT JOIN job j USING (analysis_id)
GROUP BY a.analysis_id, j.status, j.retry_count
ORDER BY a.analysis_id, j.status;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment