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
64553882
Commit
64553882
authored
Jun 15, 2011
by
Leo Gordon
Browse files
sqlite has views but not procedures
parent
85cc4260
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
+1
-0
sql/procedures.sqlite
sql/procedures.sqlite
+35
-0
No files found.
modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm
View file @
64553882
...
...
@@ -97,6 +97,7 @@ sub pipeline_create_commands {
?
[
# standard eHive tables and unique/non-unique indices:
$self
->
db_connect_command
(
$db_conn
)
.
'
<
'
.
$self
->
o
('
ensembl_cvs_root_dir
')
.
'
/ensembl-hive/sql/tables.sqlite
',
$self
->
db_connect_command
(
$db_conn
)
.
'
<
'
.
$self
->
o
('
ensembl_cvs_root_dir
')
.
'
/ensembl-hive/sql/procedures.sqlite
',
]
:
[
'
mysql
'
.
$self
->
dbconn_2_mysql
(
$db_conn
,
0
)
.
"
-e 'CREATE DATABASE
"
.
$self
->
o
('
pipeline_db
',
'
-dbname
')
.
"
'
",
...
...
sql/procedures.sqlite
0 → 100644
View file @
64553882
-- ------------------------------------------------------------------------------------------------------
--
-- Some stored functions, views and procedures used in hive:
--
-- --- show hive progress for analyses (turned into a view to give extra flexibility) -------------------
--
-- Thanks to Greg Jordan for the idea and the original version
--
-- Usage:
-- select * from progress; # the whole table (may take ages to generate, depending on the size of your pipeline)
-- select * from progress where logic_name like 'family_blast%'; # only show family_blast-related analyses
-- 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
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;
-- a convenient view that also incorporates (otherwise redundant) analysis_id and logic_name ------------
--
-- Usage:
-- select * from msg;
-- select * from msg where analysis_id=18;
-- select * from msg where logic_name like 'family_blast%';
CREATE VIEW IF NOT EXISTS msg AS
SELECT a.analysis_id, a.logic_name, m.*
FROM job_message m
JOIN job j USING (job_id)
JOIN analysis a USING (analysis_id);
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