Warning
This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.model.view package¶
Galaxy sql view models
- class galaxy.model.view.HistoryDatasetCollectionJobStateSummary(**kwargs)[source]¶
Bases:
galaxy.model.view.utils.View
- name = 'collection_job_state_summary_view'¶
- aggregate_state_query = "\nSELECT\n hdca_id,\n SUM(CASE WHEN state = 'new' THEN 1 ELSE 0 END) AS new,\n SUM(CASE WHEN state = 'resubmitted' THEN 1 ELSE 0 END) AS resubmitted,\n SUM(CASE WHEN state = 'waiting' THEN 1 ELSE 0 END) AS waiting,\n SUM(CASE WHEN state = 'queued' THEN 1 ELSE 0 END) AS queued,\n SUM(CASE WHEN state = 'running' THEN 1 ELSE 0 END) AS running,\n SUM(CASE WHEN state = 'ok' THEN 1 ELSE 0 END) AS ok,\n SUM(CASE WHEN state = 'error' THEN 1 ELSE 0 END) AS error,\n SUM(CASE WHEN state = 'failed' THEN 1 ELSE 0 END) AS failed,\n SUM(CASE WHEN state = 'paused' THEN 1 ELSE 0 END) AS paused,\n SUM(CASE WHEN state = 'deleted' THEN 1 ELSE 0 END) AS deleted,\n SUM(CASE WHEN state = 'deleted_new' THEN 1 ELSE 0 END) AS deleted_new,\n SUM(CASE WHEN state = 'upload' THEN 1 ELSE 0 END) AS upload,\n SUM(CASE WHEN job_id IS NOT NULL THEN 1 ELSE 0 END) AS all_jobs\nFROM (\n SELECT hdca.id AS hdca_id, job.id AS job_id, job.state as state\n FROM history_dataset_collection_association hdca\n LEFT JOIN implicit_collection_jobs icj\n ON icj.id = hdca.implicit_collection_jobs_id\n LEFT JOIN implicit_collection_jobs_job_association icjja\n ON icj.id = icjja.implicit_collection_jobs_id\n LEFT JOIN job\n ON icjja.job_id = job.id\n\n UNION\n\n SELECT hdca.id AS hdca_id, job.id AS job_id, job.state AS state\n FROM history_dataset_collection_association hdca\n LEFT JOIN job\n ON hdca.job_id = job.id\n) jobstates\nGROUP BY jobstates.hdca_id\n"¶
- pkeys = {'hdca_id'}¶
- __init__(**kwargs)¶
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- all_jobs¶
- deleted¶
- deleted_new¶
- error¶
- failed¶
- hdca_id¶
- new¶
- ok¶
- paused¶
- queued¶
- resubmitted¶
- running¶
- upload¶
- waiting¶