cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"No Records" - update with string "pending execution"

Pavithra_P
Frequent Guest

our DQL returns the metric which is end time of a job and updated only once a day, if the job is not completed - DQL is returning no records as result , is it possible to show static value like "pending execution" instead of no records.

2 REPLIES 2

tomaxp
Mentor

I couldn’t find a way to achieve this directly in DQL

But i think is possible workaround is to emit a daily status as a metric or business event. For example:

Emit a daily status

In the morning send an event/metric like job.status = pending.

When the job finishes send job.status = completed
This way the dashboard query always has at least one record, so you won’t see “No records”.
Example using metric ingestion v2 (0 = pending, 1 = completed):

curl -X POST "$DT_URL/api/v2/metrics/ingest" \
-H "Authorization: Api-Token $DT_TOKEN" \
-H "Content-Type: text/plain" \
--data-binary "custom.job.status,job=myJob gauge,0"

and after completion:

--data-binary "custom.job.status,job=myJob gauge,1"

Then
Handle it at the dashboard/UI layer

If the visualization type supports it, configure the “No data” behavior to display a custom message (e.g. pending execution).

If that’s not available, you can place a Markdown tile with a static message next to it, or use thresholds/colors on a 0/1 metric to display pending vs. completed.

Hi @Pavithra_P ,

If your DQL query returns a job name but the end time is null, you can use an if-else statement to add your string as shown below.

 

Screenshot 2025-09-23 at 5.16.49 PM.png

!!! Dynatrace !!!

Featured Posts