Client Failure Sparkline Method
To enable a sparkline to be dropped into a backup job report, a user-defined method for a Job enterprise object needs to be created with the following elements.
See Overview of Method Creation.
With Clause
with spark as ( select trunc(start_date), client_id, client_name, count(job_id) failed_count FROM apt_v_job WHERE client_id in(${hosts}) AND start_date between ${startDate} AND ${endDate} AND summary_status = 2 group by client_id, client_name, trunc(start_date) )Query
select client_id, client_name, aptStringConcat(failed_count) failed_count from spark s group by client_name, client_id
Join
apt_job.client_id = ClientFailureSparkline.client_id (+)
Fields
CLIENT_NAME - Check this field so that it can be included in a Dynamic Template. FAILED_COUNT - Check this field so that it can be included in a Dynamic Template. CLIENT_ID - Do not check this field as it is only needed for the method's code.