To identify deleted Runs in Workflow.Job UI in "system.lakeflow"

AlleyCat
New Contributor II

Hi,

I executed a few runs in a Workflow.Jobs UI. I then deleted some of them. I am seeing the deleted runs in "system.lakeflow.job_run_timeline". How do i know which runs are the deleted ones? Thanks

Ayushi_Suthar
Databricks Employee
Databricks Employee

Hi @AlleyCat , Hope you are doing well! 

The jobs table includes a delete_time column that records the time when the job was deleted by the user. So to identify deleted jobs, you can run a query like the following:

SELECT * FROM system.lakeflow.jobs WHERE delete_time IS NOT NULL;

Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Kudos
Ayushi

Hi @Ayushi_Suthar 

Thanks for spending time helping me on my query..

I think "SELECT * FROM system.lakeflow.jobs WHERE delete_time IS NOT NULL;" is getting deleted JOB_ID.

I would like to know if deleted RUNs of JOB_ID can be identified.

Example:
1. I ran "UpdateEmpoyeeProfile" job 5 times. It would have 5 runs.
2. Assuming RUN_ID was 1, 2, 3, 4 and 5 respectively.
3. In "Workflow > Jobs > Runs" UI, i would be seeing 5 rows of runs where "Run ID" column would be showing values 1, 2, 3, 4 and 5.
4. I deleted "Run ID=3" from the UI.
5. The UI would now show only 4 "Run ID" namely 1, 2, 4 and 5.
6. However in the database, i am unable to find a status indicating "Run ID"=3 was deleted.

Thanks

CHuppe
New Contributor II

Did you manage to resolve this?

I have the same issue. I have a job which ran only once and failed. I deleted the run in the UI, but our monitoring still shows the last execution in error because the record is still there in 

system.lakeflow.job_run_timeline and there is no flag to exclude it