Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update existing and add new SQL queries to the assessment step dashboard #269

Merged
merged 11 commits into from
Sep 25, 2023

Conversation

larsgeorge-db
Copy link
Contributor

Fixes #268

@larsgeorge-db larsgeorge-db added the pr/do-not-merge this pull request is not ready to merge label Sep 22, 2023
@larsgeorge-db larsgeorge-db requested a review from nfx as a code owner September 22, 2023 12:51
@larsgeorge-db larsgeorge-db marked this pull request as draft September 22, 2023 12:51
@larsgeorge-db
Copy link
Contributor Author

image

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #269 (17347f0) into main (f7eab58) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
+ Coverage   83.37%   83.40%   +0.02%     
==========================================
  Files          29       29              
  Lines        1979     1982       +3     
  Branches      337      337              
==========================================
+ Hits         1650     1653       +3     
  Misses        261      261              
  Partials       68       68              
Files Changed Coverage Δ
src/databricks/labs/ucx/framework/dashboards.py 76.88% <100.00%> (+0.35%) ⬆️

@larsgeorge-db
Copy link
Contributor Author

image

Copy link
Collaborator

@nfx nfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're also adding more queries?

@FastLee FastLee requested a review from nfx September 22, 2023 18:21
@FastLee FastLee added enhancement New feature or request and removed pr/do-not-merge this pull request is not ready to merge labels Sep 22, 2023
@FastLee FastLee marked this pull request as ready for review September 22, 2023 18:25
src/databricks/labs/ucx/assessment/queries/clusters.sql Outdated Show resolved Hide resolved
src/databricks/labs/ucx/assessment/queries/all_tables.sql Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/databricks/labs/ucx/assessment/queries/all_tables.sql Outdated Show resolved Hide resolved
@@ -15,7 +18,7 @@
# logging.getLogger("databricks").setLevel("DEBUG")


def test_creating_widgets(ws: WorkspaceClient):
def test_creating_widgets(ws: WorkspaceClient, make_warehouse, make_schema):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the preprovisioned warehouse through environment variable, no need to create new warehouse to test a dashboard.

creator,
CASE WHEN success=1 THEN "Compatible" ELSE "Incompatible" END AS compatible,
failures
FROM $inventory.clusters
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add NOT STARTSWITH(cluster_name, "job-") and also change the etl code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a WHERE clause? And what ETL code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused where job- is used... looking at our E2 env:

image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, in the WHERE clause

@nfx
Copy link
Collaborator

nfx commented Sep 22, 2023

@larsgeorge-db please also make the PR title very verbose - release scripts create a changelog line from the PR title.

@larsgeorge-db larsgeorge-db changed the title Enhance Assessment Dashboard (#268) Update existing and add new SQL queries to the assessment step dashboard (#268) Sep 24, 2023
@larsgeorge-db larsgeorge-db changed the title Update existing and add new SQL queries to the assessment step dashboard (#268) Update existing and add new SQL queries to the assessment step dashboard Sep 24, 2023
CASE
WHEN STARTSWITH(location, "/dbfs/")
AND NOT STARTSWITH(location, "/dbfs/mnt") THEN "DBFS ROOT"
WHEN STARTSWITH(location, "/dbfs/")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First startswith is redundant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment below.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STARTSWITH(location, "/dbfs/") AND STARTSWITH(location, "/dbfs/mnt") is redundant by boolean logic.

src/databricks/labs/ucx/assessment/queries/all_tables.sql Outdated Show resolved Hide resolved
src/databricks/labs/ucx/assessment/queries/jobs.sql Outdated Show resolved Hide resolved
@larsgeorge-db
Copy link
Contributor Author

Fixes #280

image

@larsgeorge-db larsgeorge-db force-pushed the feature/issue_268_improve_assessment_dashboard branch from 9240bac to 9488221 Compare September 25, 2023 09:51
Copy link
Collaborator

@nfx nfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last few comments remaining

CASE
WHEN STARTSWITH(location, "/dbfs/")
AND NOT STARTSWITH(location, "/dbfs/mnt") THEN "DBFS ROOT"
WHEN STARTSWITH(location, "/dbfs/")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STARTSWITH(location, "/dbfs/") AND STARTSWITH(location, "/dbfs/mnt") is redundant by boolean logic.

creator,
CASE WHEN success=1 THEN "Compatible" ELSE "Incompatible" END AS compatible,
failures
FROM $inventory.clusters
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, in the WHERE clause

@larsgeorge-db
Copy link
Contributor Author

image

@nfx nfx added this pull request to the merge queue Sep 25, 2023
Merged via the queue into main with commit dfa350a Sep 25, 2023
@nfx nfx linked an issue Sep 25, 2023 that may be closed by this pull request
@nfx nfx deleted the feature/issue_268_improve_assessment_dashboard branch September 26, 2023 23:03
nfx added a commit that referenced this pull request Sep 29, 2023
# Version changelog

## 0.2.0

* Added retrieving for all account-level groups with matching names to workspace-level groups in case no explicit configuration ([#277](#277)).
* Added crawler for Azure Service principals used for direct storage access ([#305](#305)).
* Added more SQL queries to the assessment step dashboard ([#269](#269)).
* Added filtering out for job clusters in the clusters crawler ([#298](#298)).
* Added recording errors from `crawl_tables` step in `$inventory.table_failures` table and display counter on the dashboard ([#300](#300)).
* Added comprehensive introduction user manual ([#273](#273)).
* Added interactive tutorial for local group migration readme ([#291](#291)).
* Added tutorial links to the landing page of documentation ([#290](#290)).
* Added (internal) support for account-level configuration and multi-cloud workspace list ([#264](#264)).
* Improved order of tasks in the README notebook ([#286](#286)).
* Improved installation script to run in a Windows Git Bash terminal ([#282](#282)).
* Improved installation script by setting log level to uppercase by default ([#271](#271)).
* Improved installation finish messages within installer script ([#267](#267)).
* Improved automation for `MANAGED` table migration and continued building tables migration component ([#295](#295)).
* Fixed debug notebook code with refactored package structure ([#250](#250)) ([#265](#265)).
* Fixed replacement of custom configured database to replicate in the report for external locations ([#296](#296)).
* Removed redundant `notebooks` top-level folder ([#263](#263)).
* Split checking for test failures and linting errors into independent GitHub Actions checks ([#287](#287)).
* Verify query metadata for assessment dashboards during unit tests ([#294](#294)).
@nfx nfx mentioned this pull request Sep 29, 2023
nfx added a commit that referenced this pull request Sep 29, 2023
# Version changelog

## 0.2.0

* Added retrieving for all account-level groups with matching names to
workspace-level groups in case no explicit configuration
([#277](#277)).
* Added crawler for Azure Service principals used for direct storage
access ([#305](#305)).
* Added more SQL queries to the assessment step dashboard
([#269](#269)).
* Added filtering out for job clusters in the clusters crawler
([#298](#298)).
* Added recording errors from `crawl_tables` step in
`$inventory.table_failures` table and display counter on the dashboard
([#300](#300)).
* Added comprehensive introduction user manual
([#273](#273)).
* Added interactive tutorial for local group migration readme
([#291](#291)).
* Added tutorial links to the landing page of documentation
([#290](#290)).
* Added (internal) support for account-level configuration and
multi-cloud workspace list
([#264](#264)).
* Improved order of tasks in the README notebook
([#286](#286)).
* Improved installation script to run in a Windows Git Bash terminal
([#282](#282)).
* Improved installation script by setting log level to uppercase by
default ([#271](#271)).
* Improved installation finish messages within installer script
([#267](#267)).
* Improved automation for `MANAGED` table migration and continued
building tables migration component
([#295](#295)).
* Fixed debug notebook code with refactored package structure
([#250](#250))
([#265](#265)).
* Fixed replacement of custom configured database to replicate in the
report for external locations
([#296](#296)).
* Removed redundant `notebooks` top-level folder
([#263](#263)).
* Split checking for test failures and linting errors into independent
GitHub Actions checks
([#287](#287)).
* Verify query metadata for assessment dashboards during unit tests
([#294](#294)).
FastLee pushed a commit that referenced this pull request Sep 29, 2023
# Version changelog

## 0.2.0

* Added retrieving for all account-level groups with matching names to
workspace-level groups in case no explicit configuration
([#277](#277)).
* Added crawler for Azure Service principals used for direct storage
access ([#305](#305)).
* Added more SQL queries to the assessment step dashboard
([#269](#269)).
* Added filtering out for job clusters in the clusters crawler
([#298](#298)).
* Added recording errors from `crawl_tables` step in
`$inventory.table_failures` table and display counter on the dashboard
([#300](#300)).
* Added comprehensive introduction user manual
([#273](#273)).
* Added interactive tutorial for local group migration readme
([#291](#291)).
* Added tutorial links to the landing page of documentation
([#290](#290)).
* Added (internal) support for account-level configuration and
multi-cloud workspace list
([#264](#264)).
* Improved order of tasks in the README notebook
([#286](#286)).
* Improved installation script to run in a Windows Git Bash terminal
([#282](#282)).
* Improved installation script by setting log level to uppercase by
default ([#271](#271)).
* Improved installation finish messages within installer script
([#267](#267)).
* Improved automation for `MANAGED` table migration and continued
building tables migration component
([#295](#295)).
* Fixed debug notebook code with refactored package structure
([#250](#250))
([#265](#265)).
* Fixed replacement of custom configured database to replicate in the
report for external locations
([#296](#296)).
* Removed redundant `notebooks` top-level folder
([#263](#263)).
* Split checking for test failures and linting errors into independent
GitHub Actions checks
([#287](#287)).
* Verify query metadata for assessment dashboards during unit tests
([#294](#294)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for COUNTER dashboard visualization Enhance Assessment Dashboard
3 participants