Skip to content

Commit fd9349e

Browse files
authored
Add hyperlinks to tables and order the rows by type, name (#3951)
## Changes For the table types widget 1. Table names are clickable 2. Rows are orders by type and then name ### Linked issues Resolves #3259 ### Tests - [x] manually tested - [ ] added unit tests - [ ] added integration tests - [ ] verified on staging environment (screenshot attached) <img width="1490" alt="image" src="https://github.com/user-attachments/assets/8c4d0d23-edef-4e80-9c32-8e585eb3d076" />
1 parent 5f6daaf commit fd9349e

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/databricks/labs/ucx/queries/assessment/main/10_1_all_tables.sql

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
/* --title 'Table Types' --filter name --width 6 */
1+
/*
2+
--title 'Table Types'
3+
--filter name
4+
--width 6
5+
--overrides '{"spec":{
6+
"encodings":{
7+
"columns": [
8+
{"fieldName": "name", "booleanValues": ["false", "true"], "linkUrlTemplate": "/explore/data/hive_metastore/{{ @ }}", "linkTextTemplate": "{{ @ }}", "linkTitleTemplate": "{{ @ }}", "linkOpenInNewTab": true, "type": "string", "displayAs": "link", "title": "name"},
9+
{"fieldName": "type", "booleanValues": ["false", "true"], "type": "string", "displayAs": "string", "title": "type"},
10+
{"fieldName": "format", "booleanValues": ["false", "true"], "type": "string", "displayAs": "string", "title": "format"},
11+
{"fieldName": "storage", "booleanValues": ["false", "true"], "type": "string", "displayAs": "string", "title": "storage"},
12+
{"fieldName": "is_delta", "booleanValues": ["false", "true"], "type": "string", "displayAs": "string", "title": "is_delta"},
13+
{"fieldName": "location", "booleanValues": ["false", "true"], "type": "string", "displayAs": "string", "title": "location"},
14+
{"fieldName": "table_size", "booleanValues": ["false", "true"], "type": "string", "displayAs": "string", "title": "table_size"}
15+
]}
16+
}}'
17+
*/
218
SELECT
319
CONCAT(tables.`database`, '.', tables.name) AS name,
420
object_type AS type,
@@ -42,3 +58,4 @@ SELECT
4258
FROM inventory.tables AS tables
4359
LEFT OUTER JOIN inventory.table_size AS table_size
4460
ON tables.catalog = table_size.catalog AND tables.database = table_size.database AND tables.name = table_size.name
61+
ORDER by type, name

0 commit comments

Comments
 (0)