-
Notifications
You must be signed in to change notification settings - Fork 88
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
Conversation
Codecov Report
@@ 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
|
There was a problem hiding this 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?
src/databricks/labs/ucx/assessment/queries/database_summary.sql
Outdated
Show resolved
Hide resolved
src/databricks/labs/ucx/assessment/queries/database_summary.sql
Outdated
Show resolved
Hide resolved
src/databricks/labs/ucx/assessment/queries/database_summary.sql
Outdated
Show resolved
Hide resolved
src/databricks/labs/ucx/assessment/queries/database_summary.sql
Outdated
Show resolved
Hide resolved
src/databricks/labs/ucx/assessment/queries/database_summary.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): |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 please also make the PR title very verbose - release scripts create a changelog line from the PR title. |
CASE | ||
WHEN STARTSWITH(location, "/dbfs/") | ||
AND NOT STARTSWITH(location, "/dbfs/mnt") THEN "DBFS ROOT" | ||
WHEN STARTSWITH(location, "/dbfs/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First startswith is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment below.
There was a problem hiding this comment.
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/database_summary.sql
Outdated
Show resolved
Hide resolved
src/databricks/labs/ucx/assessment/queries/database_summary.sql
Outdated
Show resolved
Hide resolved
src/databricks/labs/ucx/assessment/queries/database_summary.sql
Outdated
Show resolved
Hide resolved
Fixes #280 |
9240bac
to
9488221
Compare
There was a problem hiding this 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/") |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
src/databricks/labs/ucx/assessment/queries/database_summary.sql
Outdated
Show resolved
Hide resolved
# 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)).
# 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)).
# 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)).
Fixes #268