Skip to content

Commit b4b3b52

Browse files
authored
Deploy static views needed by #1123 interactive dashboard (#1139)
## Changes Deploy views `misc_patterns_vw` and `code_patterns_vw` that should have been deployed with #1123 and fixes the `interactive` dashboard queries. ### Functionality - [ ] added relevant user documentation - [ ] added new CLI command - [ ] modified existing command: `databricks labs ucx ...` - [ ] added a new workflow - [ ] modified existing workflow: `...` - [x] added a new table - [ ] modified existing table: `...` ### Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] manually tested - [ ] added unit tests - [ ] added integration tests - [x] verified on staging environment (screenshot attached) - [ ] ![image](https://github.com/databrickslabs/ucx/assets/1122251/1e5a64cf-52f9-414b-b213-2a1dc3c58841)
1 parent 1930792 commit b4b3b52

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

src/databricks/labs/ucx/install.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ def deploy_schema(sql_backend: SqlBackend, inventory_schema: str):
9595
deployer.deploy_view("objects", "queries/views/objects.sql")
9696
deployer.deploy_view("grant_detail", "queries/views/grant_detail.sql")
9797
deployer.deploy_view("table_estimates", "queries/views/table_estimates.sql")
98+
deployer.deploy_view("misc_patterns", "queries/views/misc_patterns.sql")
99+
deployer.deploy_view("code_patterns", "queries/views/code_patterns.sql")
98100

99101

100102
def extract_major_minor(version_string):

src/databricks/labs/ucx/queries/assessment/interactive/01_0_compute_access_mode_limitation_summary.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ iteractive_cluster_commands (
2424
WHERE a.event_date >= DATE_SUB(CURRENT_DATE(), 90)
2525
),
2626
misc_patterns(
27-
SELECT commandLanguage, dbr_version_major, dbr_version_minor, dbr_type, pattern, issue FROM $inventory.misc_patterns_vw
27+
SELECT commandLanguage, dbr_version_major, dbr_version_minor, dbr_type, pattern, issue FROM $inventory.misc_patterns
2828
),
2929
pattern_matcher(
3030
SELECT
3131
array_except(array(p.issue, lp.issue, rv.issue,dbr_type.issue), array(null)) issues,
3232
a.*
3333
FROM iteractive_cluster_commands a
34-
LEFT OUTER JOIN $inventory.code_patterns_vw p
34+
LEFT OUTER JOIN $inventory.code_patterns p
3535
ON a.commandLanguage in ('python','scala')
3636
AND contains(a.commandText, p.pattern)
3737
LEFT OUTER JOIN misc_patterns lp

src/databricks/labs/ucx/queries/assessment/interactive/03_0_cluster_summary.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ iteractive_cluster_commands (
2525
WHERE a.event_date >= DATE_SUB(CURRENT_DATE(), 90)
2626
),
2727
misc_patterns(
28-
SELECT commandLanguage, dbr_version_major, dbr_version_minor, dbr_type, pattern, issue FROM $inventory.misc_patterns_vw
28+
SELECT commandLanguage, dbr_version_major, dbr_version_minor, dbr_type, pattern, issue FROM $inventory.misc_patterns
2929
),
3030
pattern_matcher(
3131
SELECT
3232
explode(array_except(array(p.issue, lp.issue, rv.issue,dbr_type.issue), array(null))) issue,
3333
a.*
3434
FROM iteractive_cluster_commands a
35-
LEFT OUTER JOIN $inventory.code_patterns_vw p
35+
LEFT OUTER JOIN $inventory.code_patterns p
3636
ON a.commandLanguage in ('python','scala')
3737
AND contains(a.commandText, p.pattern)
3838
LEFT OUTER JOIN misc_patterns lp

0 commit comments

Comments
 (0)