Skip to content

Commit 0d214ee

Browse files
authored
Added Job Count in the Dashboard (#858)
## Changes Added one more sql for calculating the Total Job Count. ### Linked issues close: #826 Resolves #826 ### Functionality - [ ] added relevant user documentation - [ ] added new CLI command - [ ] modified existing command: `databricks labs ucx ...` - [ ] added a new workflow - [ ] modified existing workflow: `...` - [ ] added a new table - [ ] modified existing table: `...` ### Tests <img width="1553" alt="Screenshot 2024-02-01 at 12 03 08 PM" src="https://github.com/databrickslabs/ucx/assets/127273819/c7900423-354c-45e0-973f-b3539b5dd97c"> - [x] manually tested - [ ] added unit tests - [ ] added integration tests - [ ] verified on staging environment (screenshot attached)
1 parent 001f7e3 commit 0d214ee

File tree

11 files changed

+13
-10
lines changed

11 files changed

+13
-10
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- viz type=counter, name=Total Job Count, counter_label=Total Jobs, value_column=count_total_jobs
2+
-- widget row=1, col=0, size_x=2, size_y=3
3+
SELECT count(*) AS count_total_jobs FROM $inventory.jobs WHERE job_name not like '[UCX]%'

src/databricks/labs/ucx/queries/assessment/main/01_0_object_readiness.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- viz type=table, name=Object Type Readiness, columns=object_type,readiness
2-
-- widget title=Readiness, row=1, col=0, size_x=2, size_y=8
2+
-- widget title=Readiness, row=2, col=0, size_x=2, size_y=8
33
WITH raw AS (
44
SELECT object_type, object_id, IF(failures == '[]', 1, 0) AS ready FROM $inventory.objects
55
)

src/databricks/labs/ucx/queries/assessment/main/01_2_assessment_summary.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- viz type=table, name=Assessment Summary, search_by=failure, columns=failure,count
2-
-- widget title=Assessment Summary, row=1, col=2, size_x=4, size_y=8
2+
-- widget title=Assessment Summary, row=2, col=2, size_x=4, size_y=11
33
WITH raw AS (
44
SELECT EXPLODE(FROM_JSON(failures, 'array<string>')) AS failure FROM $inventory.objects WHERE failures <> '[]'
55
)

src/databricks/labs/ucx/queries/assessment/main/02_0_database_summary.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- viz type=table, name=Database Summary, search_by=database, columns=database,upgrade,tables,views,dbfs_root,delta_tables,total_grants,granted_principals,database_grants,table_grants,service_principal_grants,user_grants,group_grants
2-
-- widget title=Database Summary, col=0, row=2, size_x=6, size_y=8
2+
-- widget title=Database Summary, col=0, row=3, size_x=6, size_y=8
33
WITH table_stats AS (
44
SELECT
55
`database`,

src/databricks/labs/ucx/queries/assessment/main/03_0_all_tables.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- viz type=table, name=Table Types, search_by=name, columns=name,type,format,storage,is_delta,location
2-
-- widget title=Table Types, row=4, col=0, size_x=6, size_y=8
2+
-- widget title=Table Types, row=5, col=0, size_x=6, size_y=8
33
SELECT CONCAT(tables.`database`, '.', tables.name) AS name,
44
object_type AS type,
55
table_format AS format,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-- viz type=table, name=External Locations, columns=location
2-
-- widget title=External Locations, row=3, col=0, size_x=3, size_y=8
2+
-- widget title=External Locations, row=4, col=0, size_x=3, size_y=8
33
SELECT location
44
FROM $inventory.external_locations
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- viz type=table, name=Mount Points, columns=name,source
2-
-- widget title=Mount Points, row=3, col=3, size_x=3, size_y=8
2+
-- widget title=Mount Points, row=4, col=3, size_x=3, size_y=8
33
SELECT name,
44
source
55
FROM $inventory.mounts

src/databricks/labs/ucx/queries/assessment/main/05_0_clusters.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- viz type=table, name=Clusters, columns=failure,cluster_name,cluster_id,creator
2-
-- widget title=Incompatible clusters, row=4, col=0, size_x=3, size_y=8
2+
-- widget title=Incompatible clusters, row=5, col=0, size_x=3, size_y=8
33
SELECT EXPLODE(FROM_JSON(failures, 'array<string>')) AS failure,
44
cluster_id,
55
cluster_name,

src/databricks/labs/ucx/queries/assessment/main/05_0_jobs.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- viz type=table, name=Jobs, columns=failure,job_id,job_name,creator
2-
-- widget title=Incompatible jobs, row=4, col=3, size_x=3, size_y=8
2+
-- widget title=Incompatible jobs, row=5, col=3, size_x=3, size_y=8
33
SELECT
44
EXPLODE(FROM_JSON(failures, 'array<string>')) AS failure,
55
job_id,

src/databricks/labs/ucx/queries/assessment/main/06_0_pipelines.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- viz type=table, name=Pipelines, columns=failure,pipeline_name,creator_name
2-
-- widget title=Incompatible Delta Live Tables, row=6, col=0, size_x=3, size_y=8
2+
-- widget title=Incompatible Delta Live Tables, row=7, col=0, size_x=3, size_y=8
33
SELECT
44
EXPLODE(FROM_JSON(failures, 'array<string>')) AS failure,
55
pipeline_name,

0 commit comments

Comments
 (0)