This message was deleted.
# troubleshooting
s
This message was deleted.
k
@Peter Marshall handled a similar issue in the
sys.tasks
table like:
Copy code
WITH tasks AS (
  SELECT "task_id", "group_id", "type", "datasource", "created_time", "location", "duration", "error_msg",
  CAST (LEFT(created_time,10) || ' ' || RIGHT(LEFT(created_time,19),8) AS TIMESTAMP) AS __time,
  CASE WHEN "error_msg" = 'Shutdown request from user' THEN 'CANCELED' WHEN "status" = 'RUNNING' THEN "runner_status" ELSE "status" END as "status"
  FROM sys.tasks
  )
SELECT __time, "task_id", "status", "group_id", "type", "datasource", "created_time", "location", "duration", "error_msg",
  TIMESTAMPDIFf(MINUTE, __time, CURRENT_TIMESTAMP) as time_diff
FROM tasks
You should be able to use this script-fu on the times in
sys.segments
Copy code
select CAST (LEFT("start",10) || ' ' || RIGHT(LEFT("start",19),8) AS TIMESTAMP) AS __time from sys.segments
j
Odd. It works though. Thanks!!
😎 1