...
For those sites with a large number of tags for a given field (hundreds of shots for example), the "Show only tags from my jobs" checkbox in the Tags preferences can be used to filter down the size of the pull-down list.
Tags and the Qube! API
The tags are attributes at the top level of the job object, and are all prefaced with prod_
.
prod_show
prod_shot
prod_seq
prod_client
prod_dept
prod_custom1
prod_custom2
prod_custom3
prod_custom4
prod_custom5
They are accessible as top-level keys in the job dictionary as:
job['prod_show'],
job['prod_seq']
, etc...
Tags and the Qube! MySQL Data Warehouse
If your site wishes to write custom cost or usage report generators, the various tags are all in tables and columns which follow a naming convention.
For example, the Show tag's internal name is prod_show
, so its data warehouse dimension table is named prod_show_dim
, and the show lookup key in the other tables is named prod_show_sk
. For the Shot tag, the internal name is prod_shot
, and the table and columns are prod_shot_dim
and prod_shot_sk
.
Here's how to find the sum total of CPU-minutes used for each show for a range of jobs (in your case your WHERE
clause would probably specify a time range, and not "jobs greater than 41000":
No Format |
---|
USE pfx_dw;
SELECT
prod_show.name
, SEC_TO_TIME(SUM(cpu_seconds)) AS cpu_minutes
FROM
job_fact AS fact
INNER JOIN
prod_show_dim AS prod_show
ON
fact.prod_show_sk=prod_show.prod_show_sk
WHERE
job_id > 41000
GROUP BY
prod_show.prod_show_sk;
+------------+-------------+
| name | cpu_minutes |
+------------+-------------+
| | 00:00:05 |
| new Show 2 | 00:11:25 |
| newShow | 00:05:00 |
+------------+-------------+ |